{"openapi":"3.0.3","info":{"title":"API Reference","description":"Backend API","version":"2.1045.5"},"components":{"schemas":{"StyleSchemaInput":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Retraced-generated unique identifier for this style. Format is a ULID prefixed with 'style_' on newer records; legacy records may use an unprefixed alphanumeric ID. Stable — safe to store and use as a foreign key."},"externalId":{"description":"Your own identifier for this product, if one was supplied on create. Null otherwise.","type":["string","null"]},"forCompanyId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"]}},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"styleLevelId":{"type":"string","minLength":1,"description":"Retraced taxonomy identifier for the broad product level (e.g. APPAREL_END_CONSUMER_FINISHED_GOODS, FABRICS, TRIM_AND_ACCESSORIES). For the full list of valid values call GET /api/v2/style-types/ and read the parentId field."},"styleTypeId":{"type":"string","minLength":1},"productLevel":{"type":["string","null"]},"brands":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"departments":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"seasons":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"collections":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"claimIntentions":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"customProperties":{"type":["string","null"]},"suppliers":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"mainSupplier":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"vendors":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"imagesFileIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"url":{"type":"string"},"previewUrl":{"type":"string"},"fileType":{"type":["string","null"]},"bucketName":{"type":"string"},"name":{"type":"string"},"fileSize":{"type":["number","null"]},"contentType":{"type":["string","null"]},"fileHash":{"type":["string","null"]},"createdAt":{"anyOf":[{},{"type":"null"}]},"updatedAt":{"anyOf":[{},{"type":"null"}]},"createdBy":{"type":["string","null"]},"createdByCompanyId":{"type":["string","null"]},"createdByImpersonateId":{"type":["string","null"]},"createdByImpersonateName":{"type":["string","null"]},"createdByUserId":{"type":["string","null"]},"createdByApiKeyId":{"type":["string","null"]},"createdByApiKeyLabel":{"type":["string","null"]},"updatedByUserId":{"type":["string","null"]},"updatedByUserName":{"type":["string","null"]},"updatedByCompanyId":{"type":["string","null"]},"updatedByCompanyName":{"type":["string","null"]},"updatedByImpersonateId":{"type":["string","null"]},"updatedByImpersonateName":{"type":["string","null"]},"updatedByApiKeyId":{"type":["string","null"]},"updatedByApiKeyLabel":{"type":["string","null"]}},"required":["id","url","previewUrl","fileType","bucketName","name","fileSize","contentType","fileHash","createdAt","updatedAt"]}},"isComponent":{"type":["boolean","number"]},"isStoryActive":{"description":"Whether the public traceability page (product story) is active for this product. Activating it requires tracing data (e.g. a supply chain) to be attached to the product first.","type":["boolean","number"]},"isArchived":{"type":"boolean","description":"True if the product has been archived. Archived products are excluded from default API results."},"qrCodeUrl":{"description":"URL of the product's pre-generated QR code image (an SVG hosted on the Retraced CDN). Null until generation completes, which happens asynchronously after the product is created. The QR image encodes a Retraced-managed forwarding URL that resolves to the product's traceability page once the story is active. The URL is stable once generated — it is not regenerated when product data changes.","type":["string","null"]},"createdAt":{"anyOf":[{},{"type":"null"}],"description":"ISO 8601 UTC timestamp of when the record was created."},"updatedAt":{"anyOf":[{},{"type":"null"}],"description":"ISO 8601 UTC timestamp of when the record was last modified. Use with updatedAfterUnixMs for incremental sync."},"createdByImpersonateId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByApiKeyLabel":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByApiKeyLabel":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"ecoFootPrint":{"anyOf":[{"type":"object","properties":{"syntheticMaterialPercentage":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"recycledMaterialPercentage":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"hazardousMaterials":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"idx":{"type":"number"},"name":{"type":"string","minLength":1},"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["idx","name","percentage"]}},{"type":"null"}]},"recyclabilityAbsenceDisruptor":{"type":["boolean","null"]},"recyclabilityCanBeSorted":{"type":["boolean","null"]},"recyclabilityCanCollectAtScale":{"type":["boolean","null"]},"recyclabilityIndustrialScale":{"type":["boolean","null"]},"recyclabilityRate":{"type":["number","null"]}}},{"type":"null"}]},"weight":{"anyOf":[{"type":"object","properties":{"unit":{"type":"string"},"value":{"type":"number"}},"required":["unit","value"]},{"type":"null"}]},"tracingStory":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"tracingType":{"type":"string"},"tracingId":{"type":"string"},"isActive":{"type":"boolean"},"createdAt":{"anyOf":[{},{"type":"null"}]},"updatedAt":{"anyOf":[{},{"type":"null"}]},"tracingName":{"type":["string","null"]}},"required":["id","tracingType","tracingId","isActive","createdAt","updatedAt"]},{"type":"null"}]},"isWeightAvailable":{"description":"True if a weight value has been recorded for this variant.","type":"boolean"}},"required":["id","forCompanyId","name","codes","styleLevelId","styleTypeId","isArchived"]},"VariantSchemaInput":{"type":"object","properties":{"id":{"type":"string","minLength":1},"externalId":{"type":["string","null"]},"styleId":{"type":"string","minLength":1},"forCompanyId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"]}},"gender":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"styleLevelId":{"type":"string","minLength":1},"styleTypeId":{"type":"string","minLength":1},"color":{"type":"string","minLength":1,"maxLength":255},"imagesFileIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":["string","null"]},"previewUrl":{"type":"string"},"fileType":{"type":["string","null"]},"bucketName":{"type":"string"},"name":{"type":"string"},"fileSize":{"type":["number","null"]},"contentType":{"type":["string","null"]},"fileHash":{"type":["string","null"]},"createdAt":{"anyOf":[{},{"type":"null"}]},"updatedAt":{"anyOf":[{},{"type":"null"}]},"createdBy":{"type":["string","null"]},"createdByCompanyId":{"type":["string","null"]},"createdByImpersonateId":{"type":["string","null"]},"createdByImpersonateName":{"type":["string","null"]},"createdByUserId":{"type":["string","null"]},"createdByApiKeyId":{"type":["string","null"]},"createdByApiKeyLabel":{"type":["string","null"]},"updatedByUserId":{"type":["string","null"]},"updatedByUserName":{"type":["string","null"]},"updatedByCompanyId":{"type":["string","null"]},"updatedByCompanyName":{"type":["string","null"]},"updatedByImpersonateId":{"type":["string","null"]},"updatedByImpersonateName":{"type":["string","null"]},"updatedByApiKeyId":{"type":["string","null"]},"updatedByApiKeyLabel":{"type":["string","null"]}},"required":["id","url","previewUrl","fileType","bucketName","name","fileSize","contentType","fileHash","createdAt","updatedAt"]}},"featuredImage":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"url":{"type":["string","null"]},"previewUrl":{"type":["string","null"]},"fileType":{"type":["string","null"]},"bucketName":{"type":"string"},"name":{"type":"string"},"fileSize":{"type":["number","null"]},"contentType":{"type":["string","null"]},"fileHash":{"type":["string","null"]},"createdAt":{"anyOf":[{},{"type":"null"}]},"updatedAt":{"anyOf":[{},{"type":"null"}]},"createdBy":{"type":["string","null"]},"createdByCompanyId":{"type":["string","null"]},"createdByImpersonateId":{"type":["string","null"]},"createdByImpersonateName":{"type":["string","null"]},"createdByUserId":{"type":["string","null"]},"createdByApiKeyId":{"type":["string","null"]},"createdByApiKeyLabel":{"type":["string","null"]},"updatedByUserId":{"type":["string","null"]},"updatedByUserName":{"type":["string","null"]},"updatedByCompanyId":{"type":["string","null"]},"updatedByCompanyName":{"type":["string","null"]},"updatedByImpersonateId":{"type":["string","null"]},"updatedByImpersonateName":{"type":["string","null"]},"updatedByApiKeyId":{"type":["string","null"]},"updatedByApiKeyLabel":{"type":["string","null"]}},"required":["id","url","previewUrl","fileType","bucketName","name","fileSize","contentType","fileHash","createdAt","updatedAt","createdBy","createdByCompanyId","createdByImpersonateId","createdByImpersonateName","createdByUserId","createdByApiKeyId","createdByApiKeyLabel","updatedByUserId","updatedByUserName","updatedByCompanyId","updatedByCompanyName","updatedByImpersonateId","updatedByImpersonateName","updatedByApiKeyId","updatedByApiKeyLabel"]},{"type":"null"}]},"brands":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"departments":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"seasons":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"collections":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"customProperties":{"type":["string","null"]},"suppliers":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"mainSupplier":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"vendors":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"claimIntentions":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"weight":{"anyOf":[{"type":"object","properties":{"unit":{"type":"string"},"value":{"type":"number"}},"required":["unit","value"]},{"type":"null"}]},"overriddenFlag":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"isComponent":{"type":["boolean","number"]},"isStoryActive":{"type":["boolean","number"]},"isArchived":{"type":"boolean"},"skuCount":{"type":"number"},"createdAt":{"anyOf":[{},{"type":"null"}]},"updatedAt":{"anyOf":[{},{"type":"null"}]},"createdByImpersonateId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByApiKeyLabel":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByApiKeyLabel":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"qrCodeUrl":{"description":"URL of the product's pre-generated QR code image (an SVG hosted on the Retraced CDN). Null until generation completes, which happens asynchronously after the product is created. The QR image encodes a Retraced-managed forwarding URL that resolves to the product's traceability page once the story is active. The URL is stable once generated — it is not regenerated when product data changes.","type":["string","null"]},"tracingStory":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"tracingType":{"type":"string"},"tracingId":{"type":"string"},"isActive":{"type":"boolean"},"createdAt":{"anyOf":[{},{"type":"null"}]},"updatedAt":{"anyOf":[{},{"type":"null"}]},"tracingName":{"type":["string","null"]}},"required":["id","tracingType","tracingId","isActive","createdAt","updatedAt"]},{"type":"null"}]},"isWeightAvailable":{"type":"boolean"}},"required":["id","styleId","forCompanyId","name","codes","styleLevelId","styleTypeId","color","isArchived"]},"SkuSchemaInput":{"type":"object","properties":{"id":{"type":"string","minLength":1},"externalId":{"type":["string","null"]},"variantId":{"type":"string","minLength":1},"styleId":{"type":"string","minLength":1},"forCompanyId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"dimension":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"]}},"styleLevelId":{"type":"string","minLength":1},"styleTypeId":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"imagesFileIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":["string","null"]},"previewUrl":{"type":["string","null"]},"fileType":{"type":["string","null"]},"name":{"type":"string"},"contentType":{"type":["string","null"]},"createdAt":{"anyOf":[{},{"type":"null"}]},"updatedAt":{"anyOf":[{},{"type":"null"}]}},"required":["id","url","previewUrl","fileType","name","contentType","createdAt","updatedAt"]}},"brands":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"departments":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"seasons":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"collections":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"customProperties":{"type":["string","null"]},"suppliers":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"mainSupplier":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"vendors":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"claimIntentions":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"weight":{"anyOf":[{"type":"object","properties":{"unit":{"type":"string"},"value":{"type":"number"}},"required":["unit","value"]},{"type":"null"}]},"overriddenFlag":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"isComponent":{"type":"boolean"},"isStoryActive":{"type":"boolean","description":"Whether the public traceability page (product story) is active for this product. Activating it requires tracing data (e.g. a supply chain) to be attached to the product first."},"isArchived":{"type":"boolean"},"createdAt":{"anyOf":[{},{"type":"null"}]},"updatedAt":{"anyOf":[{},{"type":"null"}]},"createdByImpersonateId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByApiKeyLabel":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByApiKeyLabel":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"featuredImage":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"url":{"type":["string","null"]},"previewUrl":{"type":["string","null"]},"fileType":{"type":["string","null"]},"name":{"type":"string"},"contentType":{"type":["string","null"]},"createdAt":{"anyOf":[{},{"type":"null"}]},"updatedAt":{"anyOf":[{},{"type":"null"}]}},"required":["id","url","previewUrl","fileType","name","contentType","createdAt","updatedAt"]},{"type":"null"}]},"qrCodeUrl":{"description":"URL of the product's pre-generated QR code image (an SVG hosted on the Retraced CDN). Null until generation completes, which happens asynchronously after the product is created. The QR image encodes a Retraced-managed forwarding URL that resolves to the product's traceability page once the story is active. The URL is stable once generated — it is not regenerated when product data changes.","type":["string","null"]},"tracingStory":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"tracingType":{"type":"string"},"tracingId":{"type":"string"},"isActive":{"type":"boolean"},"createdAt":{"anyOf":[{},{"type":"null"}]},"updatedAt":{"anyOf":[{},{"type":"null"}]},"tracingName":{"type":["string","null"]}},"required":["id","tracingType","tracingId","isActive","createdAt","updatedAt"]},{"type":"null"}]},"isWeightAvailable":{"type":"boolean"}},"required":["id","variantId","forCompanyId","name","dimension","codes","styleLevelId","styleTypeId","color","isComponent","isStoryActive","isArchived"]},"AuditDrillDownSchemaInput":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"auditStandardName":{"type":"string"},"auditStandardId":{"type":"string"},"companyName":{"type":["string","null"]},"uploaderCompanyName":{"type":["string","null"]},"uploaderCompanyId":{"type":"string"},"auditDate":{"anyOf":[{},{"type":"null"}]},"nextPlannedAuditDate":{"anyOf":[{},{"type":"null"}]},"facilityScore":{"type":["string","null"]},"auditedBy":{"type":["string","null"]},"referenceNumber":{"type":["string","null"]},"auditType":{"type":["string","null"]},"auditFindingUrgency":{"type":["string","null"]},"auditTypeImpactAreaId":{"type":["string","null"]},"count":{"type":"number"}},"required":["id","companyId","auditStandardName","auditStandardId","companyName","uploaderCompanyName","uploaderCompanyId","auditDate","facilityScore","referenceNumber","auditType","count"]},"AuditsDrillDownResponseInput":{"type":"object","properties":{"id":{"type":"string"},"auditStandardName":{"type":"string"},"auditStandardId":{"type":"string"},"companyId":{"type":"string"},"companyName":{"type":["string","null"]},"uploaderCompanyName":{"type":["string","null"]},"uploaderCompanyId":{"type":"string"},"auditDate":{"anyOf":[{},{"type":"null"}]},"nextPlannedAuditDate":{"anyOf":[{},{"type":"null"}]},"facilityScore":{"type":["string","null"]},"auditedBy":{"type":["string","null"]},"referenceNumber":{"type":["string","null"]},"auditType":{"type":["string","null"]},"auditFindingUrgency":{"type":["string","null"]},"auditTypeImpactAreaId":{"type":["string","null"]}},"required":["id","auditStandardName","auditStandardId","companyId","companyName","uploaderCompanyName","uploaderCompanyId","auditDate","nextPlannedAuditDate","facilityScore","auditedBy","referenceNumber","auditType"]},"CertificateDrilldownInput":{"type":"object","properties":{"id":{"type":"string"},"certificateName":{"type":"string"},"certificateType":{"type":"string"},"standardId":{"type":"string"},"status":{"type":"string"},"documentNumber":{"type":["string","null"]},"issuedAt":{"anyOf":[{},{"type":"null"}]},"createdAt":{"anyOf":[{},{"type":"null"}]},"explanation":{"type":["string","null"]},"expirationDate":{"anyOf":[{},{"type":"null"}]},"issuedBy":{"type":["string","null"]},"fileId":{"type":["string","null"]},"fileUrl":{"type":["string","null"]},"fileType":{"type":["string","null"]},"fileContentType":{"type":["string","null"]},"licenseNumber":{"type":["string","null"]},"livingWage":{"type":["boolean","null"]},"minimumWage":{"type":["boolean","null"]},"isRemoved":{"type":["boolean","null"]},"isArchived":{"type":["boolean","null"]},"updatedAt":{"anyOf":[{},{"type":"null"}]},"updatedByCompanyId":{"type":["string","null"]},"createdByCompanyId":{"type":["string","null"]},"createdByUserId":{"type":["string","null"]},"facilityProcesses":{"type":["string","null"]},"depthLevel":{"type":"string"},"collaborationStatusId":{"type":["string","null"]},"officialName":{"type":"string"},"companyName":{"type":"string"},"count":{"type":"number"}},"required":["id","certificateName","certificateType","standardId","status","documentNumber","issuedAt","createdAt","explanation","expirationDate","issuedBy","fileId","fileUrl","fileType","fileContentType","licenseNumber","livingWage","minimumWage","isRemoved","isArchived","updatedAt","updatedByCompanyId","createdByCompanyId","createdByUserId","facilityProcesses","officialName","companyName","count"]},"CertificateDrillDownResponseInput":{"type":"object","properties":{"id":{"type":"string"},"certificateName":{"type":"string"},"certificateType":{"type":"string"},"standardId":{"type":"string"},"status":{"type":"string"},"documentNumber":{"type":["string","null"]},"issuedAt":{"anyOf":[{},{"type":"null"}]},"createdAt":{"anyOf":[{},{"type":"null"}]},"explanation":{"type":["string","null"]},"expirationDate":{"anyOf":[{},{"type":"null"}]},"issuedBy":{"type":["string","null"]},"fileId":{"type":["string","null"]},"fileUrl":{"type":["string","null"]},"fileType":{"type":["string","null"]},"fileContentType":{"type":["string","null"]},"licenseNumber":{"type":["string","null"]},"livingWage":{"type":["boolean","null"]},"minimumWage":{"type":["boolean","null"]},"isRemoved":{"type":["boolean","null"]},"isArchived":{"type":["boolean","null"]},"updatedAt":{"anyOf":[{},{"type":"null"}]},"updatedByCompanyId":{"type":["string","null"]},"createdByCompanyId":{"type":["string","null"]},"createdByUserId":{"type":["string","null"]},"facilityProcesses":{"type":["string","null"]},"depthLevel":{"type":"string"},"collaborationStatusId":{"type":["string","null"]},"officialName":{"type":"string"},"companyName":{"type":"string"}},"required":["id","certificateName","certificateType","standardId","status","documentNumber","issuedAt","createdAt","explanation","expirationDate","issuedBy","fileId","fileUrl","fileType","fileContentType","licenseNumber","livingWage","minimumWage","isRemoved","isArchived","updatedAt","updatedByCompanyId","createdByCompanyId","createdByUserId","facilityProcesses","officialName","companyName"]},"CertificateMetricsInput":{"type":"object","properties":{"id":{"type":"string"},"certificateName":{"type":"string"},"certificateType":{"type":"string"},"standardId":{"type":"string"},"expires":{"anyOf":[{},{"type":"null"}]},"status":{"type":"string"},"documentNumber":{"type":["string","null"]},"issueDate":{"anyOf":[{},{"type":"null"}]},"createdAt":{}},"required":["id","certificateName","certificateType","standardId","expires","status","documentNumber","issueDate","createdAt"]},"CertificateMetricsResponseInput":{"type":"object","properties":{"id":{"type":"string"},"certificateName":{"type":"string"},"certificateType":{"type":"string"},"standardId":{"type":"string"},"expires":{"anyOf":[{},{"type":"null"}]},"status":{"type":"string"},"documentNumber":{"type":["string","null"]},"issueDate":{"anyOf":[{},{"type":"null"}]},"createdAt":{}},"required":["id","certificateName","certificateType","standardId","expires","status","documentNumber","issueDate","createdAt"]},"UnitEnumInput":{"type":"string","enum":["LITRE","MILLILITRE","CENTILITRE","CUBIC_DECIMETRE","CUBIC_METRE","GALLON","QUART","PINT","GILL","FLUID_OUNCE","FLUID_DRAM","MINIM","BUSHEL","ACRE_FOOT","CORD","CUBIC_YARD","CUBIC_FOOT","CUBIC_INCH","PECK","METRE","MILLIMETRE","DECIMETRE","CENTIMETRE","INCH","NAUTICAL_MILE","MILE","FURLONG","ROD","FATHOM","YARD","FOOT","GRAM","GRAM_PER_SQUARE_METER","GRAM_PER_SQUARE_FOOT","GRAM_PER_SQUARE_YARD","OUNCE_PER_SQUARE_YARD","MILLIGRAM","KILOGRAM","METRIC_TON","POUNDS","SHORT_TON","LONG_TON","HUNDREDWEIGHT","SHORT_HUNDREDWEIGHT","LONG_HUNDREDWEIGHT","OUNCE","DRAM","GRAIN","PENNYWEIGHT","SCRUPLE","STONE","SQUARE_METRE","SQUARE_DECIMETRE","SQUARE_CENTIMETRE","SQUARE_INCH","SQUARE_MILE","SQUARE_FEET","SQUARE_ROD","SQUARE_YARD","ACRE","PIECES","PAIR","PERCENTAGE","DENIER","JUTE","ENGLISH_COUNT","METRIC_COUNT","WORSTED_COUNT","TEX","KILOWATT_HOUR","MOUND"]},"StylePropertySchemaInput":{"type":"object","properties":{"id":{"type":"string","minLength":1},"forCompanyId":{"type":"string","minLength":1},"value":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"category":{"type":"string","enum":["collections","departments","seasons","brands"]},"createdAt":{"anyOf":[{},{"type":"null"}]},"updatedAt":{"anyOf":[{},{"type":"null"}]},"createdByImpersonateId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByApiKeyLabel":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByApiKeyLabel":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]}},"required":["id","forCompanyId","value","category"]},"StylePropertyListItemSchemaInput":{"type":"object","properties":{"id":{"type":"string","minLength":1},"forCompanyId":{"type":"string","minLength":1},"value":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"category":{"type":"string","enum":["collections","departments","seasons","brands"]},"createdAt":{"anyOf":[{},{"type":"null"}]},"updatedAt":{"anyOf":[{},{"type":"null"}]},"createdByImpersonateId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByApiKeyLabel":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByApiKeyLabel":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"count":{"type":"number"}},"required":["id","forCompanyId","value","category","count"]},"StyleTypeSchemaInput":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","maxLength":255},"parentId":{"type":["string","null"]},"quantityUnits":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"weightUnits":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"isWeightAvailable":{"type":["boolean","null"]},"assetId":{"type":["string","null"]},"assetType":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"hierarchyLevel":{"type":["number","null"]},"createdAt":{"anyOf":[{},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedAt":{"anyOf":[{},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]}},"required":["id","name","parentId","quantityUnits","weightUnits","isWeightAvailable","assetId","assetType","hierarchyLevel"]},"StyleTypeListItemSchemaInput":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","maxLength":255},"parentId":{"type":["string","null"]},"quantityUnits":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"weightUnits":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"isWeightAvailable":{"type":["boolean","null"]},"assetId":{"type":["string","null"]},"assetType":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"hierarchyLevel":{"type":["number","null"]},"createdAt":{"anyOf":[{},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedAt":{"anyOf":[{},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"count":{"type":"number"}},"required":["id","name","parentId","quantityUnits","weightUnits","isWeightAvailable","assetId","assetType","hierarchyLevel","count"]},"WebshopJourneyResponseSchemaInput":{"type":"object","properties":{"productId":{"type":"string"},"product":{"type":"object","properties":{"id":{"type":"string"},"brandId":{"type":["string","null"]},"supplyChainId":{"type":["string","null"]},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"code":{"type":["string","null"]},"gender":{"type":["string","null"]},"collections":{"type":["string","null"]},"featuredImageUrl":{"type":["string","null"]},"featuredImageRemoteUrl":{"type":["string","null"]},"featuredImageId":{"type":["string","null"]},"originalFeaturedImageUrl":{"type":["string","null"]},"imageList":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"url":{"type":["string","null"]},"originalUrl":{"type":["string","null"]}}}},{"type":"null"}]},"colors":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":["string","null"]},"imageId":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"imageRemoteUrl":{"type":["string","null"]},"originalImageUrl":{"type":["string","null"]}}}},{"type":"null"}]},"materials":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"materialId":{"type":"string"},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"imageFileUrl":{"type":["string","null"]},"percentage":{"type":["string","number","null"]},"category":{"type":["string","null"]},"isRecycled":{"type":["boolean","null"]},"isSynthetic":{"type":["boolean","null"]},"materialPercentage":{"type":["number","null"]},"translations":{"anyOf":[{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"description":{"type":["string","null"]}}},{"type":"null"}]}},{"type":"null"}]}}}},{"type":"null"}]},"hazardousMaterials":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"percentage":{"type":"number"},"materialPercentage":{"type":"number"}},"required":["name","percentage"]}},{"type":"null"}]},"totalMaterialWeight":{"type":["number","null"]},"tracingId":{"type":["string","null"]},"tracingType":{"type":["string","null"]},"isProductComponent":{"type":["boolean","null"]},"isStoryActive":{"type":["boolean","null"]},"isArchived":{"type":["boolean","null"]},"badgesCount":{"type":["number","null"]},"qrCodeId":{"type":["string","null"]},"qrCodeUrl":{"type":["string","null"]},"originalQrCodeUrl":{"type":["string","null"]},"qrCodeContentType":{"type":["string","null"]},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]},"createdByImpersonateId":{"type":["string","null"]},"createdByUserId":{"type":["string","null"]},"createdByCompanyId":{"type":["string","null"]},"createdByApiKeyId":{"type":["string","null"]},"createdByApiKeyLabel":{"type":["string","null"]},"updatedByImpersonateId":{"type":["string","null"]},"updatedByImpersonateName":{"type":["string","null"]},"updatedByUserId":{"type":["string","null"]},"updatedByUserName":{"type":["string","null"]},"updatedByCompanyId":{"type":["string","null"]},"updatedByCompanyName":{"type":["string","null"]},"updatedByApiKeyId":{"type":["string","null"]},"updatedByApiKeyLabel":{"type":["string","null"]}},"required":["id"]},"companies":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"officialName":{"type":["string","null"]},"name":{"type":["string","null"]},"workosOrganizationId":{"type":["string","null"]},"featuredImageFileId":{"type":["string","null"]},"featuredImageFileUrl":{"type":["string","null"]},"videoFileId":{"type":["string","null"]},"videoFileUrl":{"type":["string","null"]},"imageList":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"originalUrl":{"type":"string"},"fileType":{"type":["string","null"]}}}},{"type":"null"}]},"country":{"type":["string","null"]},"countryName":{"type":["string","null"]},"county":{"type":["string","null"]},"city":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"addressLine1":{"type":["string","null"]},"addressLine2":{"type":["string","null"]},"phone":{"type":["string","null"]},"website":{"type":["string","null"]},"geojson":{"type":["string","null"]},"description":{"type":["string","null"]},"facilityProcesses":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"productionProcessId":{"type":"string"}}}},{"type":"null"}]},"numOfPermanentEmployees":{"type":["number","null"]},"numOfMaleEmployees":{"type":["number","null"]},"numOfFemaleEmployees":{"type":["number","null"]},"annualProductionCapacity":{"type":["number","null"]},"annualProductionCapacityUnit":{"type":["string","null"]},"minimumOrderQuantity":{"type":["number","null"]},"minimumOrderQuantityPerStyle":{"type":["number","null"]},"standardLeadTime":{"type":["number","null"]},"companySize":{"type":["string","null"]},"companyType":{"type":["string","null"]},"shopId":{"type":["string","null"]},"higgId":{"type":["string","null"]},"globalLocationNumber":{"type":["string","null"]},"vatId":{"type":["string","null"]},"dunsNumber":{"type":["string","null"]},"commercialRegisterNumber":{"type":["string","null"]},"osHubId":{"type":["string","null"]},"isDemoCompany":{"type":"number"},"isClientCompany":{"type":"number"},"createdAt":{"anyOf":[{},{"type":"null"}]},"createdByImpersonateId":{"type":["string","null"]},"createdByUserId":{"type":["string","null"]},"createdByCompanyId":{"type":["string","null"]},"createdByApiKeyId":{"type":["string","null"]},"createdByApiKeyLabel":{"type":["string","null"]},"updatedAt":{"anyOf":[{},{"type":"null"}]},"updatedByImpersonateId":{"type":["string","null"]},"updatedByImpersonateName":{"type":["string","null"]},"updatedByUserId":{"type":["string","null"]},"updatedByUserName":{"type":["string","null"]},"updatedByCompanyId":{"type":["string","null"]},"updatedByCompanyName":{"type":["string","null"]},"updatedByApiKeyId":{"type":["string","null"]},"updatedByApiKeyLabel":{"type":["string","null"]},"originalFeaturedImageFileUrl":{"type":["string","null"]},"originalVideoFileUrl":{"type":["string","null"]},"logoFileUrl":{"type":["string","null"]},"facilityProcessesNames":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"productionProcesses":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]}}}},{"type":"null"}]},"extend":{"anyOf":[{"type":"object","properties":{"title":{"type":["string","null"]},"description":{"type":["string","null"]},"featuredImageFileId":{"type":["string","null"]},"featuredImageFileUrl":{"type":["string","null"]},"videoFileId":{"type":["string","null"]},"videoFileUrl":{"type":["string","null"]},"enabledCustomInfo":{"type":["boolean","null"]},"allowSharingAddress":{"type":["boolean","null"]},"allowSharingProof":{"type":["boolean","null"]},"imageList":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"originalUrl":{"type":"string"},"fileType":{"type":["string","null"]}}}},{"type":"null"}]}}},{"type":"null"}]}},"required":["id"]}},{"type":"null"}]},"goodsTransfers":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"supplyChainId":{"type":["string","null"]},"linkId":{"type":["string","null"]},"supplierCompanyId":{"type":["string","null"]},"receiverCompanyId":{"type":["string","null"]},"shipmentMethod":{"type":["string","null"]},"transportDistance":{"type":["number","null"]},"supplierNode":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"assetId":{"type":["string","null"]},"assetCountry":{"type":["string","null"]},"assetCountryName":{"type":["string","null"]},"assetType":{"type":["string","null"]},"productionProcess":{"type":["string","null"]},"featuredFacilityProcess":{"type":["string","null"]},"featuredFacilityProcessName":{"type":["string","null"]},"companyId":{"type":["string","null"]},"facilityProcesses":{"type":["string","null"]}},"required":["id"]},{"type":"null"}]},"receiverNode":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"assetId":{"type":["string","null"]},"assetCountry":{"type":["string","null"]},"assetCountryName":{"type":["string","null"]},"assetType":{"type":["string","null"]},"productionProcess":{"type":["string","null"]},"featuredFacilityProcess":{"type":["string","null"]},"featuredFacilityProcessName":{"type":["string","null"]},"companyId":{"type":["string","null"]},"facilityProcesses":{"type":["string","null"]}},"required":["id"]},{"type":"null"}]}}}},{"type":"null"}]},"badges":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"descriptionDe":{"type":["string","null"]},"descriptionEs":{"type":["string","null"]},"descriptionFr":{"type":["string","null"]},"nameDe":{"type":["string","null"]},"nameEs":{"type":["string","null"]},"nameFr":{"type":["string","null"]},"imageFileUrl":{"type":["string","null"]},"originalImageFileUrl":{"type":["string","null"]},"proofs":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"licenseNumber":{"type":["string","null"]},"name":{"type":["string","null"]},"standardId":{"type":["string","null"]},"title":{"type":["string","null"]},"fileUrl":{"type":["string","null"]},"originalFileUrl":{"type":["string","null"]}}}},{"type":"null"}]},"category":{"type":["string","null"]},"standardId":{"type":["string","null"]},"translations":{"anyOf":[{"type":"object","additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"description":{"type":["string","null"]}}}},{"type":"null"}]}},"required":["id","name"]}},{"type":"null"}]},"ecoInformation":{"anyOf":[{"type":"object","properties":{"recyclabilityPercentage":{"type":"number"},"recyclableMaterials":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"imageFileUrl":{"type":["string","null"]},"description":{"type":["string","null"]},"materialPercentage":{"type":"number"}}}},{"type":"null"}]},"microFiberPercentage":{"type":"number"},"microFiberMaterials":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"imageFileUrl":{"type":["string","null"]},"description":{"type":["string","null"]},"materialPercentage":{"type":"number"}}}},{"type":"null"}]},"hazardousMaterialPercentage":{"type":"number"},"hazardousMaterials":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"percentage":{"type":"number"},"materialPercentage":{"type":"number"}},"required":["name"]}},{"type":"null"}]}}},{"type":"null"}]},"nodesByProductionProcesses":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"productionProcessId":{"type":"string"},"productionProcessName":{"type":["string","null"]},"productionProcessDescription":{"type":["string","null"]},"productionProcessIconBackgroundColor":{"type":["string","null"]},"productionProcessIconColor":{"type":["string","null"]},"position":{"type":["number","null"]},"nodes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"assetId":{"type":["string","null"]},"assetCountry":{"type":["string","null"]},"assetCountryName":{"type":["string","null"]},"assetType":{"type":["string","null"]},"productionProcess":{"type":["string","null"]},"featuredFacilityProcess":{"type":["string","null"]},"featuredFacilityProcessName":{"type":["string","null"]},"companyId":{"type":["string","null"]},"facilityProcesses":{"type":["string","null"]},"facilityProcessesNames":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"asset":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"officialName":{"type":["string","null"]},"name":{"type":["string","null"]},"workosOrganizationId":{"type":["string","null"]},"featuredImageFileId":{"type":["string","null"]},"featuredImageFileUrl":{"type":["string","null"]},"videoFileId":{"type":["string","null"]},"videoFileUrl":{"type":["string","null"]},"imageList":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"originalUrl":{"type":"string"},"fileType":{"type":["string","null"]}}}},{"type":"null"}]},"country":{"type":["string","null"]},"countryName":{"type":["string","null"]},"county":{"type":["string","null"]},"city":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"addressLine1":{"type":["string","null"]},"addressLine2":{"type":["string","null"]},"phone":{"type":["string","null"]},"website":{"type":["string","null"]},"geojson":{"type":["string","null"]},"description":{"type":["string","null"]},"facilityProcesses":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"productionProcessId":{"type":"string"}}}},{"type":"null"}]},"numOfPermanentEmployees":{"type":["number","null"]},"numOfMaleEmployees":{"type":["number","null"]},"numOfFemaleEmployees":{"type":["number","null"]},"annualProductionCapacity":{"type":["number","null"]},"annualProductionCapacityUnit":{"type":["string","null"]},"minimumOrderQuantity":{"type":["number","null"]},"minimumOrderQuantityPerStyle":{"type":["number","null"]},"standardLeadTime":{"type":["number","null"]},"companySize":{"type":["string","null"]},"companyType":{"type":["string","null"]},"shopId":{"type":["string","null"]},"higgId":{"type":["string","null"]},"globalLocationNumber":{"type":["string","null"]},"vatId":{"type":["string","null"]},"dunsNumber":{"type":["string","null"]},"commercialRegisterNumber":{"type":["string","null"]},"osHubId":{"type":["string","null"]},"isDemoCompany":{"type":"number"},"isClientCompany":{"type":"number"},"createdAt":{"anyOf":[{},{"type":"null"}]},"createdByImpersonateId":{"type":["string","null"]},"createdByUserId":{"type":["string","null"]},"createdByCompanyId":{"type":["string","null"]},"createdByApiKeyId":{"type":["string","null"]},"createdByApiKeyLabel":{"type":["string","null"]},"updatedAt":{"anyOf":[{},{"type":"null"}]},"updatedByImpersonateId":{"type":["string","null"]},"updatedByImpersonateName":{"type":["string","null"]},"updatedByUserId":{"type":["string","null"]},"updatedByUserName":{"type":["string","null"]},"updatedByCompanyId":{"type":["string","null"]},"updatedByCompanyName":{"type":["string","null"]},"updatedByApiKeyId":{"type":["string","null"]},"updatedByApiKeyLabel":{"type":["string","null"]},"originalFeaturedImageFileUrl":{"type":["string","null"]},"originalVideoFileUrl":{"type":["string","null"]},"logoFileUrl":{"type":["string","null"]},"facilityProcessesNames":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"productionProcesses":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]}}}},{"type":"null"}]},"extend":{"anyOf":[{"type":"object","properties":{"title":{"type":["string","null"]},"description":{"type":["string","null"]},"featuredImageFileId":{"type":["string","null"]},"featuredImageFileUrl":{"type":["string","null"]},"videoFileId":{"type":["string","null"]},"videoFileUrl":{"type":["string","null"]},"enabledCustomInfo":{"type":["boolean","null"]},"allowSharingAddress":{"type":["boolean","null"]},"allowSharingProof":{"type":["boolean","null"]},"imageList":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"originalUrl":{"type":"string"},"fileType":{"type":["string","null"]}}}},{"type":"null"}]}}},{"type":"null"}]}},"required":["id"]},{"type":"null"}]}}}},{"type":"null"}]},"companies":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"officialName":{"type":["string","null"]},"name":{"type":["string","null"]},"workosOrganizationId":{"type":["string","null"]},"featuredImageFileId":{"type":["string","null"]},"featuredImageFileUrl":{"type":["string","null"]},"videoFileId":{"type":["string","null"]},"videoFileUrl":{"type":["string","null"]},"imageList":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"originalUrl":{"type":"string"},"fileType":{"type":["string","null"]}}}},{"type":"null"}]},"country":{"type":["string","null"]},"countryName":{"type":["string","null"]},"county":{"type":["string","null"]},"city":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"addressLine1":{"type":["string","null"]},"addressLine2":{"type":["string","null"]},"phone":{"type":["string","null"]},"website":{"type":["string","null"]},"geojson":{"type":["string","null"]},"description":{"type":["string","null"]},"facilityProcesses":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"productionProcessId":{"type":"string"}}}},{"type":"null"}]},"numOfPermanentEmployees":{"type":["number","null"]},"numOfMaleEmployees":{"type":["number","null"]},"numOfFemaleEmployees":{"type":["number","null"]},"annualProductionCapacity":{"type":["number","null"]},"annualProductionCapacityUnit":{"type":["string","null"]},"minimumOrderQuantity":{"type":["number","null"]},"minimumOrderQuantityPerStyle":{"type":["number","null"]},"standardLeadTime":{"type":["number","null"]},"companySize":{"type":["string","null"]},"companyType":{"type":["string","null"]},"shopId":{"type":["string","null"]},"higgId":{"type":["string","null"]},"globalLocationNumber":{"type":["string","null"]},"vatId":{"type":["string","null"]},"dunsNumber":{"type":["string","null"]},"commercialRegisterNumber":{"type":["string","null"]},"osHubId":{"type":["string","null"]},"isDemoCompany":{"type":"number"},"isClientCompany":{"type":"number"},"createdAt":{"anyOf":[{},{"type":"null"}]},"createdByImpersonateId":{"type":["string","null"]},"createdByUserId":{"type":["string","null"]},"createdByCompanyId":{"type":["string","null"]},"createdByApiKeyId":{"type":["string","null"]},"createdByApiKeyLabel":{"type":["string","null"]},"updatedAt":{"anyOf":[{},{"type":"null"}]},"updatedByImpersonateId":{"type":["string","null"]},"updatedByImpersonateName":{"type":["string","null"]},"updatedByUserId":{"type":["string","null"]},"updatedByUserName":{"type":["string","null"]},"updatedByCompanyId":{"type":["string","null"]},"updatedByCompanyName":{"type":["string","null"]},"updatedByApiKeyId":{"type":["string","null"]},"updatedByApiKeyLabel":{"type":["string","null"]},"originalFeaturedImageFileUrl":{"type":["string","null"]},"originalVideoFileUrl":{"type":["string","null"]},"logoFileUrl":{"type":["string","null"]},"facilityProcessesNames":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"productionProcesses":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]}}}},{"type":"null"}]},"extend":{"anyOf":[{"type":"object","properties":{"title":{"type":["string","null"]},"description":{"type":["string","null"]},"featuredImageFileId":{"type":["string","null"]},"featuredImageFileUrl":{"type":["string","null"]},"videoFileId":{"type":["string","null"]},"videoFileUrl":{"type":["string","null"]},"enabledCustomInfo":{"type":["boolean","null"]},"allowSharingAddress":{"type":["boolean","null"]},"allowSharingProof":{"type":["boolean","null"]},"imageList":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"originalUrl":{"type":"string"},"fileType":{"type":["string","null"]}}}},{"type":"null"}]}}},{"type":"null"}]}},"required":["id"]}},{"type":"null"}]}},"required":["productionProcessId"]}},{"type":"null"}]}},"required":["productId","product"]},"StyleSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Retraced-generated unique identifier for this style. Format is a ULID prefixed with 'style_' on newer records; legacy records may use an unprefixed alphanumeric ID. Stable — safe to store and use as a foreign key."},"externalId":{"description":"Your own identifier for this product, if one was supplied on create. Null otherwise.","type":["string","null"]},"forCompanyId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"styleLevelId":{"type":"string","minLength":1,"description":"Retraced taxonomy identifier for the broad product level (e.g. APPAREL_END_CONSUMER_FINISHED_GOODS, FABRICS, TRIM_AND_ACCESSORIES). For the full list of valid values call GET /api/v2/style-types/ and read the parentId field."},"styleTypeId":{"type":"string","minLength":1},"productLevel":{"type":["string","null"]},"brands":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"departments":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"seasons":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"collections":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"claimIntentions":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"customProperties":{"type":["string","null"]},"suppliers":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"mainSupplier":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"vendors":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"imagesFileIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"url":{"type":"string"},"previewUrl":{"type":"string"},"fileType":{"type":["string","null"]},"bucketName":{"type":"string"},"name":{"type":"string"},"fileSize":{"type":["number","null"]},"contentType":{"type":["string","null"]},"fileHash":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdBy":{"type":["string","null"]},"createdByCompanyId":{"type":["string","null"]},"createdByImpersonateId":{"type":["string","null"]},"createdByImpersonateName":{"type":["string","null"]},"createdByUserId":{"type":["string","null"]},"createdByApiKeyId":{"type":["string","null"]},"createdByApiKeyLabel":{"type":["string","null"]},"updatedByUserId":{"type":["string","null"]},"updatedByUserName":{"type":["string","null"]},"updatedByCompanyId":{"type":["string","null"]},"updatedByCompanyName":{"type":["string","null"]},"updatedByImpersonateId":{"type":["string","null"]},"updatedByImpersonateName":{"type":["string","null"]},"updatedByApiKeyId":{"type":["string","null"]},"updatedByApiKeyLabel":{"type":["string","null"]}},"required":["id","url","previewUrl","fileType","bucketName","name","fileSize","contentType","fileHash","createdAt","updatedAt"],"additionalProperties":false}},"isComponent":{"type":["boolean","number"]},"isStoryActive":{"description":"Whether the public traceability page (product story) is active for this product. Activating it requires tracing data (e.g. a supply chain) to be attached to the product first.","type":["boolean","number"]},"isArchived":{"type":"boolean","description":"True if the product has been archived. Archived products are excluded from default API results."},"qrCodeUrl":{"description":"URL of the product's pre-generated QR code image (an SVG hosted on the Retraced CDN). Null until generation completes, which happens asynchronously after the product is created. The QR image encodes a Retraced-managed forwarding URL that resolves to the product's traceability page once the story is active. The URL is stable once generated — it is not regenerated when product data changes.","type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"ISO 8601 UTC timestamp of when the record was created."},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"ISO 8601 UTC timestamp of when the record was last modified. Use with updatedAfterUnixMs for incremental sync."},"createdByImpersonateId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByApiKeyLabel":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByApiKeyLabel":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"ecoFootPrint":{"anyOf":[{"type":"object","properties":{"syntheticMaterialPercentage":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"recycledMaterialPercentage":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"hazardousMaterials":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"idx":{"type":"number"},"name":{"type":"string","minLength":1},"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["idx","name","percentage"],"additionalProperties":false}},{"type":"null"}]},"recyclabilityAbsenceDisruptor":{"type":["boolean","null"]},"recyclabilityCanBeSorted":{"type":["boolean","null"]},"recyclabilityCanCollectAtScale":{"type":["boolean","null"]},"recyclabilityIndustrialScale":{"type":["boolean","null"]},"recyclabilityRate":{"type":["number","null"]}},"additionalProperties":false},{"type":"null"}]},"weight":{"anyOf":[{"type":"object","properties":{"unit":{"type":"string"},"value":{"type":"number"}},"required":["unit","value"],"additionalProperties":false},{"type":"null"}]},"tracingStory":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"tracingType":{"type":"string"},"tracingId":{"type":"string"},"isActive":{"type":"boolean"},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"tracingName":{"type":["string","null"]}},"required":["id","tracingType","tracingId","isActive","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"isWeightAvailable":{"description":"True if a weight value has been recorded for this variant.","type":"boolean"}},"required":["id","forCompanyId","name","codes","styleLevelId","styleTypeId","isArchived"],"additionalProperties":false},"VariantSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"externalId":{"type":["string","null"]},"styleId":{"type":"string","minLength":1},"forCompanyId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"gender":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"styleLevelId":{"type":"string","minLength":1},"styleTypeId":{"type":"string","minLength":1},"color":{"type":"string","minLength":1,"maxLength":255},"imagesFileIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":["string","null"]},"previewUrl":{"type":"string"},"fileType":{"type":["string","null"]},"bucketName":{"type":"string"},"name":{"type":"string"},"fileSize":{"type":["number","null"]},"contentType":{"type":["string","null"]},"fileHash":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdBy":{"type":["string","null"]},"createdByCompanyId":{"type":["string","null"]},"createdByImpersonateId":{"type":["string","null"]},"createdByImpersonateName":{"type":["string","null"]},"createdByUserId":{"type":["string","null"]},"createdByApiKeyId":{"type":["string","null"]},"createdByApiKeyLabel":{"type":["string","null"]},"updatedByUserId":{"type":["string","null"]},"updatedByUserName":{"type":["string","null"]},"updatedByCompanyId":{"type":["string","null"]},"updatedByCompanyName":{"type":["string","null"]},"updatedByImpersonateId":{"type":["string","null"]},"updatedByImpersonateName":{"type":["string","null"]},"updatedByApiKeyId":{"type":["string","null"]},"updatedByApiKeyLabel":{"type":["string","null"]}},"required":["id","url","previewUrl","fileType","bucketName","name","fileSize","contentType","fileHash","createdAt","updatedAt"],"additionalProperties":false}},"featuredImage":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"url":{"type":["string","null"]},"previewUrl":{"type":["string","null"]},"fileType":{"type":["string","null"]},"bucketName":{"type":"string"},"name":{"type":"string"},"fileSize":{"type":["number","null"]},"contentType":{"type":["string","null"]},"fileHash":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdBy":{"type":["string","null"]},"createdByCompanyId":{"type":["string","null"]},"createdByImpersonateId":{"type":["string","null"]},"createdByImpersonateName":{"type":["string","null"]},"createdByUserId":{"type":["string","null"]},"createdByApiKeyId":{"type":["string","null"]},"createdByApiKeyLabel":{"type":["string","null"]},"updatedByUserId":{"type":["string","null"]},"updatedByUserName":{"type":["string","null"]},"updatedByCompanyId":{"type":["string","null"]},"updatedByCompanyName":{"type":["string","null"]},"updatedByImpersonateId":{"type":["string","null"]},"updatedByImpersonateName":{"type":["string","null"]},"updatedByApiKeyId":{"type":["string","null"]},"updatedByApiKeyLabel":{"type":["string","null"]}},"required":["id","url","previewUrl","fileType","bucketName","name","fileSize","contentType","fileHash","createdAt","updatedAt","createdBy","createdByCompanyId","createdByImpersonateId","createdByImpersonateName","createdByUserId","createdByApiKeyId","createdByApiKeyLabel","updatedByUserId","updatedByUserName","updatedByCompanyId","updatedByCompanyName","updatedByImpersonateId","updatedByImpersonateName","updatedByApiKeyId","updatedByApiKeyLabel"],"additionalProperties":false},{"type":"null"}]},"brands":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"departments":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"seasons":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"collections":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"customProperties":{"type":["string","null"]},"suppliers":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"mainSupplier":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"vendors":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"claimIntentions":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"weight":{"anyOf":[{"type":"object","properties":{"unit":{"type":"string"},"value":{"type":"number"}},"required":["unit","value"],"additionalProperties":false},{"type":"null"}]},"overriddenFlag":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"isComponent":{"type":["boolean","number"]},"isStoryActive":{"type":["boolean","number"]},"isArchived":{"type":"boolean"},"skuCount":{"type":"number"},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdByImpersonateId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByApiKeyLabel":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByApiKeyLabel":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"qrCodeUrl":{"description":"URL of the product's pre-generated QR code image (an SVG hosted on the Retraced CDN). Null until generation completes, which happens asynchronously after the product is created. The QR image encodes a Retraced-managed forwarding URL that resolves to the product's traceability page once the story is active. The URL is stable once generated — it is not regenerated when product data changes.","type":["string","null"]},"tracingStory":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"tracingType":{"type":"string"},"tracingId":{"type":"string"},"isActive":{"type":"boolean"},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"tracingName":{"type":["string","null"]}},"required":["id","tracingType","tracingId","isActive","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"isWeightAvailable":{"type":"boolean"}},"required":["id","styleId","forCompanyId","name","codes","styleLevelId","styleTypeId","color","isArchived"],"additionalProperties":false},"SkuSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"externalId":{"type":["string","null"]},"variantId":{"type":"string","minLength":1},"styleId":{"type":"string","minLength":1},"forCompanyId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"dimension":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"styleLevelId":{"type":"string","minLength":1},"styleTypeId":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"imagesFileIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":["string","null"]},"previewUrl":{"type":["string","null"]},"fileType":{"type":["string","null"]},"name":{"type":"string"},"contentType":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","url","previewUrl","fileType","name","contentType","createdAt","updatedAt"],"additionalProperties":false}},"brands":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"departments":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"seasons":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"collections":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"customProperties":{"type":["string","null"]},"suppliers":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"mainSupplier":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"vendors":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"claimIntentions":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"weight":{"anyOf":[{"type":"object","properties":{"unit":{"type":"string"},"value":{"type":"number"}},"required":["unit","value"],"additionalProperties":false},{"type":"null"}]},"overriddenFlag":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"isComponent":{"type":"boolean"},"isStoryActive":{"type":"boolean","description":"Whether the public traceability page (product story) is active for this product. Activating it requires tracing data (e.g. a supply chain) to be attached to the product first."},"isArchived":{"type":"boolean"},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdByImpersonateId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByApiKeyLabel":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByApiKeyLabel":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"featuredImage":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"url":{"type":["string","null"]},"previewUrl":{"type":["string","null"]},"fileType":{"type":["string","null"]},"name":{"type":"string"},"contentType":{"type":["string","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","url","previewUrl","fileType","name","contentType","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"qrCodeUrl":{"description":"URL of the product's pre-generated QR code image (an SVG hosted on the Retraced CDN). Null until generation completes, which happens asynchronously after the product is created. The QR image encodes a Retraced-managed forwarding URL that resolves to the product's traceability page once the story is active. The URL is stable once generated — it is not regenerated when product data changes.","type":["string","null"]},"tracingStory":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"tracingType":{"type":"string"},"tracingId":{"type":"string"},"isActive":{"type":"boolean"},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"tracingName":{"type":["string","null"]}},"required":["id","tracingType","tracingId","isActive","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"isWeightAvailable":{"type":"boolean"}},"required":["id","variantId","forCompanyId","name","dimension","codes","styleLevelId","styleTypeId","color","isComponent","isStoryActive","isArchived"],"additionalProperties":false},"AuditDrillDownSchema":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"auditStandardName":{"type":"string"},"auditStandardId":{"type":"string"},"companyName":{"type":["string","null"]},"uploaderCompanyName":{"type":["string","null"]},"uploaderCompanyId":{"type":"string"},"auditDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"nextPlannedAuditDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"facilityScore":{"type":["string","null"]},"auditedBy":{"type":["string","null"]},"referenceNumber":{"type":["string","null"]},"auditType":{"type":["string","null"]},"auditFindingUrgency":{"type":["string","null"]},"auditTypeImpactAreaId":{"type":["string","null"]},"count":{"type":"number"}},"required":["id","companyId","auditStandardName","auditStandardId","companyName","uploaderCompanyName","uploaderCompanyId","auditDate","facilityScore","referenceNumber","auditType","count"],"additionalProperties":false},"AuditsDrillDownResponse":{"type":"object","properties":{"id":{"type":"string"},"auditStandardName":{"type":"string"},"auditStandardId":{"type":"string"},"companyId":{"type":"string"},"companyName":{"type":["string","null"]},"uploaderCompanyName":{"type":["string","null"]},"uploaderCompanyId":{"type":"string"},"auditDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"nextPlannedAuditDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"facilityScore":{"type":["string","null"]},"auditedBy":{"type":["string","null"]},"referenceNumber":{"type":["string","null"]},"auditType":{"type":["string","null"]},"auditFindingUrgency":{"type":["string","null"]},"auditTypeImpactAreaId":{"type":["string","null"]}},"required":["id","auditStandardName","auditStandardId","companyId","companyName","uploaderCompanyName","uploaderCompanyId","auditDate","nextPlannedAuditDate","facilityScore","auditedBy","referenceNumber","auditType"],"additionalProperties":false},"CertificateDrilldown":{"type":"object","properties":{"id":{"type":"string"},"certificateName":{"type":"string"},"certificateType":{"type":"string"},"standardId":{"type":"string"},"status":{"type":"string"},"documentNumber":{"type":["string","null"]},"issuedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"explanation":{"type":["string","null"]},"expirationDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"issuedBy":{"type":["string","null"]},"fileId":{"type":["string","null"]},"fileUrl":{"type":["string","null"]},"fileType":{"type":["string","null"]},"fileContentType":{"type":["string","null"]},"licenseNumber":{"type":["string","null"]},"livingWage":{"type":["boolean","null"]},"minimumWage":{"type":["boolean","null"]},"isRemoved":{"type":["boolean","null"]},"isArchived":{"type":["boolean","null"]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedByCompanyId":{"type":["string","null"]},"createdByCompanyId":{"type":["string","null"]},"createdByUserId":{"type":["string","null"]},"facilityProcesses":{"type":["string","null"]},"depthLevel":{"type":"string"},"collaborationStatusId":{"type":["string","null"]},"officialName":{"type":"string"},"companyName":{"type":"string"},"count":{"type":"number"}},"required":["id","certificateName","certificateType","standardId","status","documentNumber","issuedAt","createdAt","explanation","expirationDate","issuedBy","fileId","fileUrl","fileType","fileContentType","licenseNumber","livingWage","minimumWage","isRemoved","isArchived","updatedAt","updatedByCompanyId","createdByCompanyId","createdByUserId","facilityProcesses","officialName","companyName","count"],"additionalProperties":false},"CertificateDrillDownResponse":{"type":"object","properties":{"id":{"type":"string"},"certificateName":{"type":"string"},"certificateType":{"type":"string"},"standardId":{"type":"string"},"status":{"type":"string"},"documentNumber":{"type":["string","null"]},"issuedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"explanation":{"type":["string","null"]},"expirationDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"issuedBy":{"type":["string","null"]},"fileId":{"type":["string","null"]},"fileUrl":{"type":["string","null"]},"fileType":{"type":["string","null"]},"fileContentType":{"type":["string","null"]},"licenseNumber":{"type":["string","null"]},"livingWage":{"type":["boolean","null"]},"minimumWage":{"type":["boolean","null"]},"isRemoved":{"type":["boolean","null"]},"isArchived":{"type":["boolean","null"]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedByCompanyId":{"type":["string","null"]},"createdByCompanyId":{"type":["string","null"]},"createdByUserId":{"type":["string","null"]},"facilityProcesses":{"type":["string","null"]},"depthLevel":{"type":"string"},"collaborationStatusId":{"type":["string","null"]},"officialName":{"type":"string"},"companyName":{"type":"string"}},"required":["id","certificateName","certificateType","standardId","status","documentNumber","issuedAt","createdAt","explanation","expirationDate","issuedBy","fileId","fileUrl","fileType","fileContentType","licenseNumber","livingWage","minimumWage","isRemoved","isArchived","updatedAt","updatedByCompanyId","createdByCompanyId","createdByUserId","facilityProcesses","officialName","companyName"],"additionalProperties":false},"CertificateMetrics":{"type":"object","properties":{"id":{"type":"string"},"certificateName":{"type":"string"},"certificateType":{"type":"string"},"standardId":{"type":"string"},"expires":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"status":{"type":"string"},"documentNumber":{"type":["string","null"]},"issueDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","certificateName","certificateType","standardId","expires","status","documentNumber","issueDate","createdAt"],"additionalProperties":false},"CertificateMetricsResponse":{"type":"object","properties":{"id":{"type":"string"},"certificateName":{"type":"string"},"certificateType":{"type":"string"},"standardId":{"type":"string"},"expires":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"status":{"type":"string"},"documentNumber":{"type":["string","null"]},"issueDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","certificateName","certificateType","standardId","expires","status","documentNumber","issueDate","createdAt"],"additionalProperties":false},"UnitEnum":{"type":"string","enum":["LITRE","MILLILITRE","CENTILITRE","CUBIC_DECIMETRE","CUBIC_METRE","GALLON","QUART","PINT","GILL","FLUID_OUNCE","FLUID_DRAM","MINIM","BUSHEL","ACRE_FOOT","CORD","CUBIC_YARD","CUBIC_FOOT","CUBIC_INCH","PECK","METRE","MILLIMETRE","DECIMETRE","CENTIMETRE","INCH","NAUTICAL_MILE","MILE","FURLONG","ROD","FATHOM","YARD","FOOT","GRAM","GRAM_PER_SQUARE_METER","GRAM_PER_SQUARE_FOOT","GRAM_PER_SQUARE_YARD","OUNCE_PER_SQUARE_YARD","MILLIGRAM","KILOGRAM","METRIC_TON","POUNDS","SHORT_TON","LONG_TON","HUNDREDWEIGHT","SHORT_HUNDREDWEIGHT","LONG_HUNDREDWEIGHT","OUNCE","DRAM","GRAIN","PENNYWEIGHT","SCRUPLE","STONE","SQUARE_METRE","SQUARE_DECIMETRE","SQUARE_CENTIMETRE","SQUARE_INCH","SQUARE_MILE","SQUARE_FEET","SQUARE_ROD","SQUARE_YARD","ACRE","PIECES","PAIR","PERCENTAGE","DENIER","JUTE","ENGLISH_COUNT","METRIC_COUNT","WORSTED_COUNT","TEX","KILOWATT_HOUR","MOUND"]},"StylePropertySchema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"forCompanyId":{"type":"string","minLength":1},"value":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"category":{"type":"string","enum":["collections","departments","seasons","brands"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdByImpersonateId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByApiKeyLabel":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByApiKeyLabel":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]}},"required":["id","forCompanyId","value","category"],"additionalProperties":false},"StylePropertyListItemSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"forCompanyId":{"type":"string","minLength":1},"value":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"category":{"type":"string","enum":["collections","departments","seasons","brands"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdByImpersonateId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByApiKeyLabel":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByApiKeyLabel":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"count":{"type":"number"}},"required":["id","forCompanyId","value","category","count"],"additionalProperties":false},"StyleTypeSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","maxLength":255},"parentId":{"type":["string","null"]},"quantityUnits":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"weightUnits":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"isWeightAvailable":{"type":["boolean","null"]},"assetId":{"type":["string","null"]},"assetType":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"hierarchyLevel":{"type":["number","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]}},"required":["id","name","parentId","quantityUnits","weightUnits","isWeightAvailable","assetId","assetType","hierarchyLevel"],"additionalProperties":false},"StyleTypeListItemSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","maxLength":255},"parentId":{"type":["string","null"]},"quantityUnits":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"weightUnits":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"isWeightAvailable":{"type":["boolean","null"]},"assetId":{"type":["string","null"]},"assetType":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"hierarchyLevel":{"type":["number","null"]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"count":{"type":"number"}},"required":["id","name","parentId","quantityUnits","weightUnits","isWeightAvailable","assetId","assetType","hierarchyLevel","count"],"additionalProperties":false},"WebshopJourneyResponseSchema":{"type":"object","properties":{"productId":{"type":"string"},"product":{"type":"object","properties":{"id":{"type":"string"},"brandId":{"type":["string","null"]},"supplyChainId":{"type":["string","null"]},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"code":{"type":["string","null"]},"gender":{"type":["string","null"]},"collections":{"type":["string","null"]},"featuredImageUrl":{"type":["string","null"]},"featuredImageRemoteUrl":{"type":["string","null"]},"featuredImageId":{"type":["string","null"]},"originalFeaturedImageUrl":{"type":["string","null"]},"imageList":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"url":{"type":["string","null"]},"originalUrl":{"type":["string","null"]}},"additionalProperties":false}},{"type":"null"}]},"colors":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":["string","null"]},"imageId":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"imageRemoteUrl":{"type":["string","null"]},"originalImageUrl":{"type":["string","null"]}},"additionalProperties":false}},{"type":"null"}]},"materials":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"materialId":{"type":"string"},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"imageFileUrl":{"type":["string","null"]},"percentage":{"type":["string","number","null"]},"category":{"type":["string","null"]},"isRecycled":{"type":["boolean","null"]},"isSynthetic":{"type":["boolean","null"]},"materialPercentage":{"type":["number","null"]},"translations":{"anyOf":[{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"description":{"type":["string","null"]}},"additionalProperties":false},{"type":"null"}]}},{"type":"null"}]}},"additionalProperties":false}},{"type":"null"}]},"hazardousMaterials":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"percentage":{"type":"number"},"materialPercentage":{"type":"number"}},"required":["name","percentage"],"additionalProperties":false}},{"type":"null"}]},"totalMaterialWeight":{"type":["number","null"]},"tracingId":{"type":["string","null"]},"tracingType":{"type":["string","null"]},"isProductComponent":{"type":["boolean","null"]},"isStoryActive":{"type":["boolean","null"]},"isArchived":{"type":["boolean","null"]},"badgesCount":{"type":["number","null"]},"qrCodeId":{"type":["string","null"]},"qrCodeUrl":{"type":["string","null"]},"originalQrCodeUrl":{"type":["string","null"]},"qrCodeContentType":{"type":["string","null"]},"createdAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]},"updatedAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]},"createdByImpersonateId":{"type":["string","null"]},"createdByUserId":{"type":["string","null"]},"createdByCompanyId":{"type":["string","null"]},"createdByApiKeyId":{"type":["string","null"]},"createdByApiKeyLabel":{"type":["string","null"]},"updatedByImpersonateId":{"type":["string","null"]},"updatedByImpersonateName":{"type":["string","null"]},"updatedByUserId":{"type":["string","null"]},"updatedByUserName":{"type":["string","null"]},"updatedByCompanyId":{"type":["string","null"]},"updatedByCompanyName":{"type":["string","null"]},"updatedByApiKeyId":{"type":["string","null"]},"updatedByApiKeyLabel":{"type":["string","null"]}},"required":["id"],"additionalProperties":false},"companies":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"officialName":{"type":["string","null"]},"name":{"type":["string","null"]},"workosOrganizationId":{"type":["string","null"]},"featuredImageFileId":{"type":["string","null"]},"featuredImageFileUrl":{"type":["string","null"]},"videoFileId":{"type":["string","null"]},"videoFileUrl":{"type":["string","null"]},"imageList":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"originalUrl":{"type":"string"},"fileType":{"type":["string","null"]}},"additionalProperties":false}},{"type":"null"}]},"country":{"type":["string","null"]},"countryName":{"type":["string","null"]},"county":{"type":["string","null"]},"city":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"addressLine1":{"type":["string","null"]},"addressLine2":{"type":["string","null"]},"phone":{"type":["string","null"]},"website":{"type":["string","null"]},"geojson":{"type":["string","null"]},"description":{"type":["string","null"]},"facilityProcesses":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"productionProcessId":{"type":"string"}},"additionalProperties":false}},{"type":"null"}]},"numOfPermanentEmployees":{"type":["number","null"]},"numOfMaleEmployees":{"type":["number","null"]},"numOfFemaleEmployees":{"type":["number","null"]},"annualProductionCapacity":{"type":["number","null"]},"annualProductionCapacityUnit":{"type":["string","null"]},"minimumOrderQuantity":{"type":["number","null"]},"minimumOrderQuantityPerStyle":{"type":["number","null"]},"standardLeadTime":{"type":["number","null"]},"companySize":{"type":["string","null"]},"companyType":{"type":["string","null"]},"shopId":{"type":["string","null"]},"higgId":{"type":["string","null"]},"globalLocationNumber":{"type":["string","null"]},"vatId":{"type":["string","null"]},"dunsNumber":{"type":["string","null"]},"commercialRegisterNumber":{"type":["string","null"]},"osHubId":{"type":["string","null"]},"isDemoCompany":{"type":"number"},"isClientCompany":{"type":"number"},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdByImpersonateId":{"type":["string","null"]},"createdByUserId":{"type":["string","null"]},"createdByCompanyId":{"type":["string","null"]},"createdByApiKeyId":{"type":["string","null"]},"createdByApiKeyLabel":{"type":["string","null"]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedByImpersonateId":{"type":["string","null"]},"updatedByImpersonateName":{"type":["string","null"]},"updatedByUserId":{"type":["string","null"]},"updatedByUserName":{"type":["string","null"]},"updatedByCompanyId":{"type":["string","null"]},"updatedByCompanyName":{"type":["string","null"]},"updatedByApiKeyId":{"type":["string","null"]},"updatedByApiKeyLabel":{"type":["string","null"]},"originalFeaturedImageFileUrl":{"type":["string","null"]},"originalVideoFileUrl":{"type":["string","null"]},"logoFileUrl":{"type":["string","null"]},"facilityProcessesNames":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"productionProcesses":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"additionalProperties":false}},{"type":"null"}]},"extend":{"anyOf":[{"type":"object","properties":{"title":{"type":["string","null"]},"description":{"type":["string","null"]},"featuredImageFileId":{"type":["string","null"]},"featuredImageFileUrl":{"type":["string","null"]},"videoFileId":{"type":["string","null"]},"videoFileUrl":{"type":["string","null"]},"enabledCustomInfo":{"type":["boolean","null"]},"allowSharingAddress":{"type":["boolean","null"]},"allowSharingProof":{"type":["boolean","null"]},"imageList":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"originalUrl":{"type":"string"},"fileType":{"type":["string","null"]}},"additionalProperties":false}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"required":["id"],"additionalProperties":false}},{"type":"null"}]},"goodsTransfers":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"supplyChainId":{"type":["string","null"]},"linkId":{"type":["string","null"]},"supplierCompanyId":{"type":["string","null"]},"receiverCompanyId":{"type":["string","null"]},"shipmentMethod":{"type":["string","null"]},"transportDistance":{"type":["number","null"]},"supplierNode":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"assetId":{"type":["string","null"]},"assetCountry":{"type":["string","null"]},"assetCountryName":{"type":["string","null"]},"assetType":{"type":["string","null"]},"productionProcess":{"type":["string","null"]},"featuredFacilityProcess":{"type":["string","null"]},"featuredFacilityProcessName":{"type":["string","null"]},"companyId":{"type":["string","null"]},"facilityProcesses":{"type":["string","null"]}},"required":["id"],"additionalProperties":false},{"type":"null"}]},"receiverNode":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"assetId":{"type":["string","null"]},"assetCountry":{"type":["string","null"]},"assetCountryName":{"type":["string","null"]},"assetType":{"type":["string","null"]},"productionProcess":{"type":["string","null"]},"featuredFacilityProcess":{"type":["string","null"]},"featuredFacilityProcessName":{"type":["string","null"]},"companyId":{"type":["string","null"]},"facilityProcesses":{"type":["string","null"]}},"required":["id"],"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false}},{"type":"null"}]},"badges":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"descriptionDe":{"type":["string","null"]},"descriptionEs":{"type":["string","null"]},"descriptionFr":{"type":["string","null"]},"nameDe":{"type":["string","null"]},"nameEs":{"type":["string","null"]},"nameFr":{"type":["string","null"]},"imageFileUrl":{"type":["string","null"]},"originalImageFileUrl":{"type":["string","null"]},"proofs":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"licenseNumber":{"type":["string","null"]},"name":{"type":["string","null"]},"standardId":{"type":["string","null"]},"title":{"type":["string","null"]},"fileUrl":{"type":["string","null"]},"originalFileUrl":{"type":["string","null"]}},"additionalProperties":false}},{"type":"null"}]},"category":{"type":["string","null"]},"standardId":{"type":["string","null"]},"translations":{"anyOf":[{"type":"object","additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"description":{"type":["string","null"]}},"additionalProperties":false}},{"type":"null"}]}},"required":["id","name"],"additionalProperties":false}},{"type":"null"}]},"ecoInformation":{"anyOf":[{"type":"object","properties":{"recyclabilityPercentage":{"type":"number"},"recyclableMaterials":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"imageFileUrl":{"type":["string","null"]},"description":{"type":["string","null"]},"materialPercentage":{"type":"number"}},"additionalProperties":false}},{"type":"null"}]},"microFiberPercentage":{"type":"number"},"microFiberMaterials":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"imageFileUrl":{"type":["string","null"]},"description":{"type":["string","null"]},"materialPercentage":{"type":"number"}},"additionalProperties":false}},{"type":"null"}]},"hazardousMaterialPercentage":{"type":"number"},"hazardousMaterials":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"percentage":{"type":"number"},"materialPercentage":{"type":"number"}},"required":["name"],"additionalProperties":false}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"nodesByProductionProcesses":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"productionProcessId":{"type":"string"},"productionProcessName":{"type":["string","null"]},"productionProcessDescription":{"type":["string","null"]},"productionProcessIconBackgroundColor":{"type":["string","null"]},"productionProcessIconColor":{"type":["string","null"]},"position":{"type":["number","null"]},"nodes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"assetId":{"type":["string","null"]},"assetCountry":{"type":["string","null"]},"assetCountryName":{"type":["string","null"]},"assetType":{"type":["string","null"]},"productionProcess":{"type":["string","null"]},"featuredFacilityProcess":{"type":["string","null"]},"featuredFacilityProcessName":{"type":["string","null"]},"companyId":{"type":["string","null"]},"facilityProcesses":{"type":["string","null"]},"facilityProcessesNames":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"asset":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"officialName":{"type":["string","null"]},"name":{"type":["string","null"]},"workosOrganizationId":{"type":["string","null"]},"featuredImageFileId":{"type":["string","null"]},"featuredImageFileUrl":{"type":["string","null"]},"videoFileId":{"type":["string","null"]},"videoFileUrl":{"type":["string","null"]},"imageList":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"originalUrl":{"type":"string"},"fileType":{"type":["string","null"]}},"additionalProperties":false}},{"type":"null"}]},"country":{"type":["string","null"]},"countryName":{"type":["string","null"]},"county":{"type":["string","null"]},"city":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"addressLine1":{"type":["string","null"]},"addressLine2":{"type":["string","null"]},"phone":{"type":["string","null"]},"website":{"type":["string","null"]},"geojson":{"type":["string","null"]},"description":{"type":["string","null"]},"facilityProcesses":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"productionProcessId":{"type":"string"}},"additionalProperties":false}},{"type":"null"}]},"numOfPermanentEmployees":{"type":["number","null"]},"numOfMaleEmployees":{"type":["number","null"]},"numOfFemaleEmployees":{"type":["number","null"]},"annualProductionCapacity":{"type":["number","null"]},"annualProductionCapacityUnit":{"type":["string","null"]},"minimumOrderQuantity":{"type":["number","null"]},"minimumOrderQuantityPerStyle":{"type":["number","null"]},"standardLeadTime":{"type":["number","null"]},"companySize":{"type":["string","null"]},"companyType":{"type":["string","null"]},"shopId":{"type":["string","null"]},"higgId":{"type":["string","null"]},"globalLocationNumber":{"type":["string","null"]},"vatId":{"type":["string","null"]},"dunsNumber":{"type":["string","null"]},"commercialRegisterNumber":{"type":["string","null"]},"osHubId":{"type":["string","null"]},"isDemoCompany":{"type":"number"},"isClientCompany":{"type":"number"},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdByImpersonateId":{"type":["string","null"]},"createdByUserId":{"type":["string","null"]},"createdByCompanyId":{"type":["string","null"]},"createdByApiKeyId":{"type":["string","null"]},"createdByApiKeyLabel":{"type":["string","null"]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedByImpersonateId":{"type":["string","null"]},"updatedByImpersonateName":{"type":["string","null"]},"updatedByUserId":{"type":["string","null"]},"updatedByUserName":{"type":["string","null"]},"updatedByCompanyId":{"type":["string","null"]},"updatedByCompanyName":{"type":["string","null"]},"updatedByApiKeyId":{"type":["string","null"]},"updatedByApiKeyLabel":{"type":["string","null"]},"originalFeaturedImageFileUrl":{"type":["string","null"]},"originalVideoFileUrl":{"type":["string","null"]},"logoFileUrl":{"type":["string","null"]},"facilityProcessesNames":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"productionProcesses":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"additionalProperties":false}},{"type":"null"}]},"extend":{"anyOf":[{"type":"object","properties":{"title":{"type":["string","null"]},"description":{"type":["string","null"]},"featuredImageFileId":{"type":["string","null"]},"featuredImageFileUrl":{"type":["string","null"]},"videoFileId":{"type":["string","null"]},"videoFileUrl":{"type":["string","null"]},"enabledCustomInfo":{"type":["boolean","null"]},"allowSharingAddress":{"type":["boolean","null"]},"allowSharingProof":{"type":["boolean","null"]},"imageList":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"originalUrl":{"type":"string"},"fileType":{"type":["string","null"]}},"additionalProperties":false}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"required":["id"],"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false}},{"type":"null"}]},"companies":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"officialName":{"type":["string","null"]},"name":{"type":["string","null"]},"workosOrganizationId":{"type":["string","null"]},"featuredImageFileId":{"type":["string","null"]},"featuredImageFileUrl":{"type":["string","null"]},"videoFileId":{"type":["string","null"]},"videoFileUrl":{"type":["string","null"]},"imageList":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"originalUrl":{"type":"string"},"fileType":{"type":["string","null"]}},"additionalProperties":false}},{"type":"null"}]},"country":{"type":["string","null"]},"countryName":{"type":["string","null"]},"county":{"type":["string","null"]},"city":{"type":["string","null"]},"zipCode":{"type":["string","null"]},"addressLine1":{"type":["string","null"]},"addressLine2":{"type":["string","null"]},"phone":{"type":["string","null"]},"website":{"type":["string","null"]},"geojson":{"type":["string","null"]},"description":{"type":["string","null"]},"facilityProcesses":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"productionProcessId":{"type":"string"}},"additionalProperties":false}},{"type":"null"}]},"numOfPermanentEmployees":{"type":["number","null"]},"numOfMaleEmployees":{"type":["number","null"]},"numOfFemaleEmployees":{"type":["number","null"]},"annualProductionCapacity":{"type":["number","null"]},"annualProductionCapacityUnit":{"type":["string","null"]},"minimumOrderQuantity":{"type":["number","null"]},"minimumOrderQuantityPerStyle":{"type":["number","null"]},"standardLeadTime":{"type":["number","null"]},"companySize":{"type":["string","null"]},"companyType":{"type":["string","null"]},"shopId":{"type":["string","null"]},"higgId":{"type":["string","null"]},"globalLocationNumber":{"type":["string","null"]},"vatId":{"type":["string","null"]},"dunsNumber":{"type":["string","null"]},"commercialRegisterNumber":{"type":["string","null"]},"osHubId":{"type":["string","null"]},"isDemoCompany":{"type":"number"},"isClientCompany":{"type":"number"},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdByImpersonateId":{"type":["string","null"]},"createdByUserId":{"type":["string","null"]},"createdByCompanyId":{"type":["string","null"]},"createdByApiKeyId":{"type":["string","null"]},"createdByApiKeyLabel":{"type":["string","null"]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedByImpersonateId":{"type":["string","null"]},"updatedByImpersonateName":{"type":["string","null"]},"updatedByUserId":{"type":["string","null"]},"updatedByUserName":{"type":["string","null"]},"updatedByCompanyId":{"type":["string","null"]},"updatedByCompanyName":{"type":["string","null"]},"updatedByApiKeyId":{"type":["string","null"]},"updatedByApiKeyLabel":{"type":["string","null"]},"originalFeaturedImageFileUrl":{"type":["string","null"]},"originalVideoFileUrl":{"type":["string","null"]},"logoFileUrl":{"type":["string","null"]},"facilityProcessesNames":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"productionProcesses":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"additionalProperties":false}},{"type":"null"}]},"extend":{"anyOf":[{"type":"object","properties":{"title":{"type":["string","null"]},"description":{"type":["string","null"]},"featuredImageFileId":{"type":["string","null"]},"featuredImageFileUrl":{"type":["string","null"]},"videoFileId":{"type":["string","null"]},"videoFileUrl":{"type":["string","null"]},"enabledCustomInfo":{"type":["boolean","null"]},"allowSharingAddress":{"type":["boolean","null"]},"allowSharingProof":{"type":["boolean","null"]},"imageList":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"originalUrl":{"type":"string"},"fileType":{"type":["string","null"]}},"additionalProperties":false}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"required":["id"],"additionalProperties":false}},{"type":"null"}]}},"required":["productionProcessId"],"additionalProperties":false}},{"type":"null"}]}},"required":["productId","product"],"additionalProperties":false}}},"paths":{"/api/admin/claims/{id}/list-styles":{"get":{"tags":["Administration/Claims"],"description":"Returns all styles associated with a specific claim (admin, unscoped).","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500},"in":"query","name":"limit","required":false,"description":"Number of results per page. The default and maximum vary per endpoint."},{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","required":false,"description":"Page number (1-based). Defaults to 1."},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"$ref":"#/components/schemas/StyleSchema"}}},"required":["meta","data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/claims/{id}":{"put":{"tags":["Administration/Claims"],"description":"Updates an existing claim (admin, unscoped). Keeps existing status.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"explanation":{"nullable":true,"type":"string"},"expirationDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$"},"issueDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$"},"issuedBy":{"nullable":true,"type":"string","maxLength":255},"fileId":{"nullable":true,"type":"string","minLength":1},"documentNumber":{"nullable":true,"type":"string","maxLength":255},"licenseNumber":{"nullable":true,"type":"string","maxLength":255},"livingWage":{"nullable":true,"type":"string"},"minimumWage":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"styleIds":{"type":"array","items":{"type":"string","minLength":1}},"shouldAttachChildren":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"standardId":{"type":"string"},"status":{"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"explanation":{"nullable":true,"type":"string"},"expirationDate":{"nullable":true,"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$"},{"type":"string"}]},"issueDate":{"nullable":true,"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$"},{"type":"string"}]},"issuedBy":{"nullable":true,"type":"string"},"fileId":{"nullable":true,"type":"string"},"fileUrl":{"nullable":true,"type":"string"},"fileType":{"nullable":true,"type":"string"},"fileContentType":{"nullable":true,"type":"string"},"documentNumber":{"nullable":true,"type":"string"},"licenseNumber":{"nullable":true,"type":"string"},"livingWage":{"nullable":true,"type":"string"},"minimumWage":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"logoFileUrl":{"nullable":true,"type":"string"},"isRemoved":{"anyOf":[{"type":"number"},{"type":"boolean"}]},"isArchived":{"anyOf":[{"type":"number"},{"type":"boolean"}]},"isValidWithLatestRules":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"certificateDependencies":{"nullable":true,"type":"object","properties":{"products":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"translations":{"nullable":true,"type":"object","additionalProperties":{}},"providerName":{"nullable":true,"type":"string"},"companyName":{"nullable":true,"type":"string"},"companyOfficialName":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"createdByUserEmail":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"}},"required":["id","companyId","standardId","status","expirationDate","issueDate"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/companies/{id}":{"get":{"summary":"Get a company by id for admins","tags":["Administration/Companies"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"isDemoCompany":{"nullable":true,"type":"number"},"isRemoved":{"nullable":true,"type":"number"},"isClientCompany":{"nullable":true,"type":"number"},"parentId":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"displayName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"transliteratedDisplayName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"transliteratedOfficialName":{"nullable":true,"type":"string"},"officialNameLocalized":{"nullable":true,"type":"string"},"internalCompanyCode":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"fileType":{"type":"string"},"originalUrl":{"type":"string"}},"required":["id","url"],"additionalProperties":false}},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"object","properties":{"type":{"type":"string"},"geometry":{"type":"object","properties":{"type":{"type":"string"},"coordinates":{"type":"array","items":{"type":"number"}}},"required":["type","coordinates"],"additionalProperties":false}},"required":["type","geometry"],"additionalProperties":false},"companySize":{"nullable":true,"type":"string","enum":["FROM_0_TO_1","FROM_2_TO_10","FROM_11_TO_50","FROM_51_TO_200","FROM_201_TO_500","FROM_501_TO_1000","FROM_1001_TO_5000","FROM_5001_TO_10000","FROM_10001_TO_INFINITE"]},"companyType":{"nullable":true,"type":"string","enum":["EDUCATIONAL_INSTITUTION","GOVERNMENT_AGENCY","NONPROFIT","PARTNERSHIP","PRIVATELY_HELD","FAMILY_BUSINESS","PUBLIC_COMPANY","SELF_EMPLOYED","SOLE_PROPRIETORSHIP"]},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"commercialRegistrationNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"manufacturerIdentificationCode":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"slcpFacilityId":{"nullable":true,"type":"string"},"textileExchangeId":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"workosOrganizationId":{"nullable":true,"type":"string"},"zdhcId":{"nullable":true,"type":"string"},"annualProductionCapacity":{"nullable":true,"type":"string"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"string"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"string"},"standardLeadTime":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"videoFile":{"nullable":true,"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"type":"string","format":"date-time"},"retracedRiskScore":{"nullable":true,"type":"string"},"collaborationEndDate":{"nullable":true,"type":"string","format":"date-time"},"relationshipType":{"nullable":true,"type":"string"},"relationshipTypeNames":{"nullable":true,"type":"string"},"supplyChainTier":{"nullable":true,"type":"string"},"responsiblePerson":{"nullable":true,"type":"string"},"responsiblePersonNames":{"nullable":true,"type":"string"},"vendors":{"nullable":true,"type":"string"},"vendorsNames":{"nullable":true,"type":"string"},"agents":{"nullable":true,"type":"string"},"agentsNames":{"nullable":true,"type":"string"},"enabledFeatures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"}},"required":["id","name","description"],"additionalProperties":false}}},"required":["id","enabledFeatures"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a company's admin-managed fields (demo, client, parent, removed)","tags":["Administration/Companies"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"isDemoCompany":{"type":"boolean"},"isClientCompany":{"type":"boolean"},"parentId":{"nullable":true,"type":"string","minLength":1},"isRemoved":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"isDemoCompany":{"nullable":true,"type":"number"},"isRemoved":{"nullable":true,"type":"number"},"isClientCompany":{"nullable":true,"type":"number"},"parentId":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"displayName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"transliteratedDisplayName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"transliteratedOfficialName":{"nullable":true,"type":"string"},"officialNameLocalized":{"nullable":true,"type":"string"},"internalCompanyCode":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"fileType":{"type":"string"},"originalUrl":{"type":"string"}},"required":["id","url"],"additionalProperties":false}},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"object","properties":{"type":{"type":"string"},"geometry":{"type":"object","properties":{"type":{"type":"string"},"coordinates":{"type":"array","items":{"type":"number"}}},"required":["type","coordinates"],"additionalProperties":false}},"required":["type","geometry"],"additionalProperties":false},"companySize":{"nullable":true,"type":"string","enum":["FROM_0_TO_1","FROM_2_TO_10","FROM_11_TO_50","FROM_51_TO_200","FROM_201_TO_500","FROM_501_TO_1000","FROM_1001_TO_5000","FROM_5001_TO_10000","FROM_10001_TO_INFINITE"]},"companyType":{"nullable":true,"type":"string","enum":["EDUCATIONAL_INSTITUTION","GOVERNMENT_AGENCY","NONPROFIT","PARTNERSHIP","PRIVATELY_HELD","FAMILY_BUSINESS","PUBLIC_COMPANY","SELF_EMPLOYED","SOLE_PROPRIETORSHIP"]},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"commercialRegistrationNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"manufacturerIdentificationCode":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"slcpFacilityId":{"nullable":true,"type":"string"},"textileExchangeId":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"workosOrganizationId":{"nullable":true,"type":"string"},"zdhcId":{"nullable":true,"type":"string"},"annualProductionCapacity":{"nullable":true,"type":"string"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"string"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"string"},"standardLeadTime":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"videoFile":{"nullable":true,"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"type":"string","format":"date-time"},"retracedRiskScore":{"nullable":true,"type":"string"},"collaborationEndDate":{"nullable":true,"type":"string","format":"date-time"},"relationshipType":{"nullable":true,"type":"string"},"relationshipTypeNames":{"nullable":true,"type":"string"},"supplyChainTier":{"nullable":true,"type":"string"},"responsiblePerson":{"nullable":true,"type":"string"},"responsiblePersonNames":{"nullable":true,"type":"string"},"vendors":{"nullable":true,"type":"string"},"vendorsNames":{"nullable":true,"type":"string"},"agents":{"nullable":true,"type":"string"},"agentsNames":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/companies/list":{"get":{"summary":"List companies across all networks for admins","tags":["Administration/Companies"],"description":"Paginated, filterable, sortable, unscoped list of companies (admin only). Supports an `isDropDown` mode that returns every matching company without page slicing.","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":15,"type":"integer","minimum":0,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","pattern":"^[a-zA-Z]+:(ASC|DESC|asc|desc)$"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"hasFeature","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"in":"query","name":"isDropDown","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"parentId":{"nullable":true,"type":"string"},"parentDisplayName":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","pageSize","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/companies/{id}/list-network":{"get":{"summary":"Get list of companies in the network of a given company","tags":["Administration/Companies"],"description":"Retrieve paginated list of companies that are in the same network as the specified company (admin only)","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500},"in":"query","name":"limit","required":false,"description":"Number of results per page. The default and maximum vary per endpoint."},{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","required":false,"description":"Page number (1-based). Defaults to 1."},{"schema":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"in":"query","name":"order","required":false},{"schema":{"default":"name","type":"string","enum":["name","country","updatedAt","facilityProcesses","city","createdAt","officialName","isDemoCompany"]},"in":"query","name":"sort","required":false},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"isDemoCompany":{"nullable":true,"type":"number"},"isRemoved":{"nullable":true,"type":"number"},"isClientCompany":{"nullable":true,"type":"number"},"parentId":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"displayName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"transliteratedDisplayName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"transliteratedOfficialName":{"nullable":true,"type":"string"},"officialNameLocalized":{"nullable":true,"type":"string"},"internalCompanyCode":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"fileType":{"type":"string"},"originalUrl":{"type":"string"}},"required":["id","url"],"additionalProperties":false}},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"object","properties":{"type":{"type":"string"},"geometry":{"type":"object","properties":{"type":{"type":"string"},"coordinates":{"type":"array","items":{"type":"number"}}},"required":["type","coordinates"],"additionalProperties":false}},"required":["type","geometry"],"additionalProperties":false},"companySize":{"nullable":true,"type":"string","enum":["FROM_0_TO_1","FROM_2_TO_10","FROM_11_TO_50","FROM_51_TO_200","FROM_201_TO_500","FROM_501_TO_1000","FROM_1001_TO_5000","FROM_5001_TO_10000","FROM_10001_TO_INFINITE"]},"companyType":{"nullable":true,"type":"string","enum":["EDUCATIONAL_INSTITUTION","GOVERNMENT_AGENCY","NONPROFIT","PARTNERSHIP","PRIVATELY_HELD","FAMILY_BUSINESS","PUBLIC_COMPANY","SELF_EMPLOYED","SOLE_PROPRIETORSHIP"]},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"commercialRegistrationNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"manufacturerIdentificationCode":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"slcpFacilityId":{"nullable":true,"type":"string"},"textileExchangeId":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"workosOrganizationId":{"nullable":true,"type":"string"},"zdhcId":{"nullable":true,"type":"string"},"annualProductionCapacity":{"nullable":true,"type":"string"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"string"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"string"},"standardLeadTime":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"videoFile":{"nullable":true,"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"type":"string","format":"date-time"},"retracedRiskScore":{"nullable":true,"type":"string"},"collaborationEndDate":{"nullable":true,"type":"string","format":"date-time"},"relationshipType":{"nullable":true,"type":"string"},"relationshipTypeNames":{"nullable":true,"type":"string"},"supplyChainTier":{"nullable":true,"type":"string"},"responsiblePerson":{"nullable":true,"type":"string"},"responsiblePersonNames":{"nullable":true,"type":"string"},"vendors":{"nullable":true,"type":"string"},"vendorsNames":{"nullable":true,"type":"string"},"agents":{"nullable":true,"type":"string"},"agentsNames":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/admin/companies/list-by-platform-feature-id/{id}":{"get":{"summary":"List companies linked to a platform feature (admin only)","tags":["Administration/Companies"],"description":"Paginated, filterable, sortable list of companies with an active link to the given platform feature.","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":15,"type":"integer","minimum":0,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","pattern":"^[a-zA-Z]+:(ASC|DESC|asc|desc)$"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"parentId":{"nullable":true,"type":"string"},"parentDisplayName":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","pageSize","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/companies/{id}/list-tracing-orders":{"get":{"summary":"List cascade-tracing orders for a company (admin only)","tags":["Administration/Companies"],"description":"Paginated, filterable, sortable union of purchase and sales tracing orders visible to the given company.","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":15,"type":"integer","minimum":0,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","pattern":"^[a-zA-Z]+:(ASC|DESC)(,[a-zA-Z]+:(ASC|DESC))*$"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"nullable":true,"type":"string"},"isPurchaseOrder":{"type":"number"}},"required":["id","isPurchaseOrder"],"additionalProperties":{}}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","pageSize","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/companies/{forCompanyId}/profile/{type}":{"get":{"summary":"Get a company's own profile for a given template, for admins","tags":["Administration/Companies"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"forCompanyId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"type","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"forCompanyId":{"type":"string"},"byCompanyId":{"type":"string"},"onBehalfOfCompanyId":{"type":"string"},"profileType":{"type":"string"},"data":{"type":"object","additionalProperties":{}},"isConnected":{"type":"boolean"},"isReverseConnected":{"type":"boolean"},"templateCompletionPercentage":{"type":"number"}},"required":["forCompanyId","byCompanyId","onBehalfOfCompanyId","profileType","data","isConnected","isReverseConnected"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/companies/{id}/list-tech-insights":{"get":{"summary":"List tech insights (row counts) for a company","tags":["Administration/Companies"],"description":"Returns row counts across the tables most relevant to a company, grouped into categories for the admin diagnostics screen.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"number"},"category":{"type":"string","enum":["user activity","vendor","compliance","tracing","assets","uncategorised"]}},"required":["key","value","category"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/companies/{id}/credits":{"post":{"summary":"Top up credits for a company","tags":["Administration/Companies"],"description":"Add credits to a company credit balance (admin only)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"description":{"type":"string","maxLength":500}},"required":["amount"]}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"balance":{"type":"number"}},"required":["balance"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"get":{"summary":"List credit transactions for a company","tags":["Administration/Companies"],"description":"Retrieve paginated list of credit transactions for a company (admin only)","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Number of results per page. The default and maximum vary per endpoint."},{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","required":false,"description":"Page number (1-based). Defaults to 1."},{"schema":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"in":"query","name":"order","required":false},{"schema":{"default":"created_at","type":"string","enum":["created_at","amount","type"]},"in":"query","name":"sort","required":false},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"analysisId":{"nullable":true,"type":"string"},"type":{"type":"string"},"amount":{"type":"number"},"balanceBefore":{"nullable":true,"type":"number"},"balanceAfter":{"nullable":true,"type":"number"},"userEmail":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","companyId","analysisId","type","amount","balanceBefore","balanceAfter","userEmail","description","createdAt","updatedAt"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/companies/{id}/credit-balance":{"get":{"summary":"Get credit balance for a company","tags":["Administration/Companies"],"description":"Retrieve the current credit balance, reserved, and consumed values for a company (admin only)","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"balance":{"type":"number"},"reserved":{"type":"number"},"consumed":{"type":"number"}},"required":["balance","reserved","consumed"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/companies/templates/{templateId}/answer":{"patch":{"tags":["Administration/Companies/Templates"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"source":{"type":"object","properties":{},"additionalProperties":{}}}},"onBehalfOfCompanyId":{"type":"string","minLength":1,"maxLength":64},"forCompanyId":{"type":"string","minLength":1,"maxLength":64},"answer":{"type":"object","additionalProperties":{"type":"object","properties":{"value":{},"verificationMeta":{"type":"object","properties":{"id":{"type":"string"},"objectId":{"type":"string"},"version":{"type":"string"},"issueDate":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","objectId","version","issueDate"]},"timestamp":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["value"],"additionalProperties":{}}}},"required":["onBehalfOfCompanyId","forCompanyId","answer"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"templateId","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/admin/companies-removed/{id}":{"get":{"summary":"Get a soft-deleted company by id for admins","tags":["Administration/Companies"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"isDemoCompany":{"nullable":true,"type":"number"},"isRemoved":{"nullable":true,"type":"number"},"isClientCompany":{"nullable":true,"type":"number"},"parentId":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"displayName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"transliteratedDisplayName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"transliteratedOfficialName":{"nullable":true,"type":"string"},"officialNameLocalized":{"nullable":true,"type":"string"},"internalCompanyCode":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"fileType":{"type":"string"},"originalUrl":{"type":"string"}},"required":["id","url"],"additionalProperties":false}},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"object","properties":{"type":{"type":"string"},"geometry":{"type":"object","properties":{"type":{"type":"string"},"coordinates":{"type":"array","items":{"type":"number"}}},"required":["type","coordinates"],"additionalProperties":false}},"required":["type","geometry"],"additionalProperties":false},"companySize":{"nullable":true,"type":"string","enum":["FROM_0_TO_1","FROM_2_TO_10","FROM_11_TO_50","FROM_51_TO_200","FROM_201_TO_500","FROM_501_TO_1000","FROM_1001_TO_5000","FROM_5001_TO_10000","FROM_10001_TO_INFINITE"]},"companyType":{"nullable":true,"type":"string","enum":["EDUCATIONAL_INSTITUTION","GOVERNMENT_AGENCY","NONPROFIT","PARTNERSHIP","PRIVATELY_HELD","FAMILY_BUSINESS","PUBLIC_COMPANY","SELF_EMPLOYED","SOLE_PROPRIETORSHIP"]},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"commercialRegistrationNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"manufacturerIdentificationCode":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"slcpFacilityId":{"nullable":true,"type":"string"},"textileExchangeId":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"workosOrganizationId":{"nullable":true,"type":"string"},"zdhcId":{"nullable":true,"type":"string"},"annualProductionCapacity":{"nullable":true,"type":"string"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"string"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"string"},"standardLeadTime":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"videoFile":{"nullable":true,"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"type":"string","format":"date-time"},"retracedRiskScore":{"nullable":true,"type":"string"},"collaborationEndDate":{"nullable":true,"type":"string","format":"date-time"},"relationshipType":{"nullable":true,"type":"string"},"relationshipTypeNames":{"nullable":true,"type":"string"},"supplyChainTier":{"nullable":true,"type":"string"},"responsiblePerson":{"nullable":true,"type":"string"},"responsiblePersonNames":{"nullable":true,"type":"string"},"vendors":{"nullable":true,"type":"string"},"vendorsNames":{"nullable":true,"type":"string"},"agents":{"nullable":true,"type":"string"},"agentsNames":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/companies-removed/list":{"get":{"summary":"List soft-removed companies for admins","tags":["Administration/Companies"],"description":"Paginated, filterable, sortable list of soft-deleted (removed) companies (admin only).","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":15,"type":"integer","minimum":0,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","pattern":"^[a-zA-Z]+:(ASC|DESC|asc|desc)$"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"hasFeature","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"in":"query","name":"isDropDown","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"parentId":{"nullable":true,"type":"string"},"parentDisplayName":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","pageSize","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/companies-removed/{id}/list-network":{"get":{"summary":"Get list of soft-deleted companies in the network of a given company","tags":["Administration/Companies"],"description":"Retrieve paginated list of soft-deleted (removed) companies that are in the same network as the specified company (admin only)","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500},"in":"query","name":"limit","required":false,"description":"Number of results per page. The default and maximum vary per endpoint."},{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","required":false,"description":"Page number (1-based). Defaults to 1."},{"schema":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"in":"query","name":"order","required":false},{"schema":{"default":"name","type":"string","enum":["name","country","updatedAt","facilityProcesses","city","createdAt","officialName","isDemoCompany"]},"in":"query","name":"sort","required":false},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"isDemoCompany":{"nullable":true,"type":"number"},"isRemoved":{"nullable":true,"type":"number"},"isClientCompany":{"nullable":true,"type":"number"},"parentId":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"displayName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"transliteratedDisplayName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"transliteratedOfficialName":{"nullable":true,"type":"string"},"officialNameLocalized":{"nullable":true,"type":"string"},"internalCompanyCode":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"fileType":{"type":"string"},"originalUrl":{"type":"string"}},"required":["id","url"],"additionalProperties":false}},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"object","properties":{"type":{"type":"string"},"geometry":{"type":"object","properties":{"type":{"type":"string"},"coordinates":{"type":"array","items":{"type":"number"}}},"required":["type","coordinates"],"additionalProperties":false}},"required":["type","geometry"],"additionalProperties":false},"companySize":{"nullable":true,"type":"string","enum":["FROM_0_TO_1","FROM_2_TO_10","FROM_11_TO_50","FROM_51_TO_200","FROM_201_TO_500","FROM_501_TO_1000","FROM_1001_TO_5000","FROM_5001_TO_10000","FROM_10001_TO_INFINITE"]},"companyType":{"nullable":true,"type":"string","enum":["EDUCATIONAL_INSTITUTION","GOVERNMENT_AGENCY","NONPROFIT","PARTNERSHIP","PRIVATELY_HELD","FAMILY_BUSINESS","PUBLIC_COMPANY","SELF_EMPLOYED","SOLE_PROPRIETORSHIP"]},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"commercialRegistrationNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"manufacturerIdentificationCode":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"slcpFacilityId":{"nullable":true,"type":"string"},"textileExchangeId":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"workosOrganizationId":{"nullable":true,"type":"string"},"zdhcId":{"nullable":true,"type":"string"},"annualProductionCapacity":{"nullable":true,"type":"string"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"string"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"string"},"standardLeadTime":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"videoFile":{"nullable":true,"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"type":"string","format":"date-time"},"retracedRiskScore":{"nullable":true,"type":"string"},"collaborationEndDate":{"nullable":true,"type":"string","format":"date-time"},"relationshipType":{"nullable":true,"type":"string"},"relationshipTypeNames":{"nullable":true,"type":"string"},"supplyChainTier":{"nullable":true,"type":"string"},"responsiblePerson":{"nullable":true,"type":"string"},"responsiblePersonNames":{"nullable":true,"type":"string"},"vendors":{"nullable":true,"type":"string"},"vendorsNames":{"nullable":true,"type":"string"},"agents":{"nullable":true,"type":"string"},"agentsNames":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/admin/document-types/":{"get":{"tags":["Administration/Document Types"],"parameters":[{"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"count","required":false},{"schema":{"type":"string"},"in":"query","name":"sort","required":false},{"schema":{"type":"string"},"in":"query","name":"name","required":false},{"schema":{"type":"string"},"in":"query","name":"description","required":false},{"schema":{"type":"string"},"in":"query","name":"impactAreaDescription","required":false},{"schema":{"default":"ALL","type":"string","enum":["TRANSACTIONAL","COMPANY","PRODUCT","ALL"]},"in":"query","name":"documentClass","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"in":"query","name":"isDeprecated","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"documentClass":{"type":"string","enum":["TRANSACTIONAL","COMPANY","PRODUCT"]},"hierarchyId":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"impactAreaDescription":{"nullable":true,"type":"string"},"isDeprecated":{"type":"boolean"},"documentCount":{"type":"number"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"}},"required":["id","title","description","documentClass","hierarchyId","impactAreaId","impactAreaDescription","isDeprecated","documentCount","createdAt","createdByUserId","updatedAt","updatedByUserId"],"additionalProperties":false}}},"required":["meta","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"post":{"tags":["Administration/Document Types"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":255},"impactAreaId":{"type":"string","maxLength":255},"documentClass":{"default":"COMPANY","type":"string","enum":["TRANSACTIONAL","COMPANY","PRODUCT"]}},"required":["title"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"documentClass":{"type":"string","enum":["TRANSACTIONAL","COMPANY","PRODUCT"]},"hierarchyId":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"impactAreaDescription":{"nullable":true,"type":"string"},"isDeprecated":{"type":"boolean"},"documentCount":{"type":"number"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"}},"required":["id","title","description","documentClass","hierarchyId","impactAreaId","impactAreaDescription","isDeprecated","documentCount","createdAt","createdByUserId","updatedAt","updatedByUserId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/document-types/{id}":{"get":{"tags":["Administration/Document Types"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"documentClass":{"type":"string","enum":["TRANSACTIONAL","COMPANY","PRODUCT"]},"hierarchyId":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"impactAreaDescription":{"nullable":true,"type":"string"},"isDeprecated":{"type":"boolean"},"documentCount":{"type":"number"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"}},"required":["id","title","description","documentClass","hierarchyId","impactAreaId","impactAreaDescription","isDeprecated","documentCount","createdAt","createdByUserId","updatedAt","updatedByUserId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"patch":{"tags":["Administration/Document Types"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":255},"impactAreaId":{"type":"string","maxLength":255}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"documentClass":{"type":"string","enum":["TRANSACTIONAL","COMPANY","PRODUCT"]},"hierarchyId":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"impactAreaDescription":{"nullable":true,"type":"string"},"isDeprecated":{"type":"boolean"},"documentCount":{"type":"number"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"}},"required":["id","title","description","documentClass","hierarchyId","impactAreaId","impactAreaDescription","isDeprecated","documentCount","createdAt","createdByUserId","updatedAt","updatedByUserId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"delete":{"tags":["Administration/Document Types"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/files/list":{"post":{"tags":["Administration/Files"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"created_at","type":"string","enum":["created_at","name","file_type","file_size","bucket_name","content_type"]},"name":{"type":"string"},"bucketName":{"nullable":true,"type":"string","enum":["public","private","incoming"]},"contentType":{"nullable":true,"type":"string","enum":["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/octet-stream","application/pdf","text/rtf","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/kswps","application/zip","binary/octet-stream","IMAGE","image/bmp","image/gif","image/heic","image/jpeg","image/png","image/svg+xml","image/tiff","image/webp","text/csv","video/mp4","video/webm","video/quicktime","video/x-msvideo","video/x-matroska"]},"fileType":{"nullable":true,"type":"string","enum":["IMAGE","VIDEO","DOCUMENT"]}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"bucketName":{"type":"string","enum":["public","private","incoming"]},"url":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"fileType":{"nullable":true,"type":"string","enum":["IMAGE","VIDEO","DOCUMENT"]},"documentText":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string","enum":["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/octet-stream","application/pdf","text/rtf","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/kswps","application/zip","binary/octet-stream","IMAGE","image/bmp","image/gif","image/heic","image/jpeg","image/png","image/svg+xml","image/tiff","image/webp","text/csv","video/mp4","video/webm","video/quicktime","video/x-msvideo","video/x-matroska"]},"contentMd5Hash":{"nullable":true,"type":"string"},"fileHash":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"isMigrated":{"nullable":true,"type":"integer","minimum":0,"maximum":1},"isPrivate":{"nullable":true,"type":"integer","minimum":0,"maximum":1},"uploadUrl":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"},"previewUrl":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdBy":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByImpersonateName":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"normalizeAttemptedAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","bucketName","url","name","fileType","contentType","fileHash","fileSize","isMigrated","isPrivate","createdAt","createdBy","createdByCompanyId","createdByApiKeyId","createdByApiKeyLabel","createdByImpersonateId","createdByImpersonateName","createdByUserId","updatedAt","updatedByApiKeyId","updatedByApiKeyLabel","updatedByCompanyId","updatedByCompanyName","updatedByImpersonateId","updatedByImpersonateName","updatedByUserId","updatedByUserName"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/admin/files/{id}":{"get":{"tags":["Administration/Files"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string","minLength":1},"bucketName":{"type":"string","enum":["public","private","incoming"]},"url":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"fileType":{"nullable":true,"type":"string","enum":["IMAGE","VIDEO","DOCUMENT"]},"documentText":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string","enum":["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/octet-stream","application/pdf","text/rtf","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/kswps","application/zip","binary/octet-stream","IMAGE","image/bmp","image/gif","image/heic","image/jpeg","image/png","image/svg+xml","image/tiff","image/webp","text/csv","video/mp4","video/webm","video/quicktime","video/x-msvideo","video/x-matroska"]},"contentMd5Hash":{"nullable":true,"type":"string"},"fileHash":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"isMigrated":{"nullable":true,"type":"integer","minimum":0,"maximum":1},"isPrivate":{"nullable":true,"type":"integer","minimum":0,"maximum":1},"uploadUrl":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"},"previewUrl":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdBy":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByImpersonateName":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"normalizeAttemptedAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","bucketName","url","name","fileType","contentType","fileHash","fileSize","isMigrated","isPrivate","createdAt","createdBy","createdByCompanyId","createdByApiKeyId","createdByApiKeyLabel","createdByImpersonateId","createdByImpersonateName","createdByUserId","updatedAt","updatedByApiKeyId","updatedByApiKeyLabel","updatedByCompanyId","updatedByCompanyName","updatedByImpersonateId","updatedByImpersonateName","updatedByUserId","updatedByUserName"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/admin/files/ai-processing-jobs/list":{"post":{"tags":["Administration/Files"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":15},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"created_at","type":"string","enum":["created_at","job_type"]},"fileId":{"type":"string","minLength":1},"jobType":{"type":"string"}},"required":["fileId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1},"jobType":{"type":"string","minLength":1},"input":{"nullable":true,"type":"string"},"result":{"nullable":true},"provider":{"nullable":true,"type":"string"},"model":{"nullable":true,"type":"string"},"inputTokens":{"nullable":true,"type":"number"},"outputTokens":{"nullable":true,"type":"number"},"totalTokens":{"nullable":true,"type":"number"},"completedInMs":{"nullable":true,"type":"number"},"createdAt":{"type":"string","format":"date-time"},"queueJobProcessor":{"nullable":true,"type":"object","properties":{"id":{"nullable":true,"type":"string"},"jobId":{"nullable":true,"type":"string"},"processorNamespace":{"nullable":true,"type":"string"},"status":{"type":"string"},"priority":{"type":"number"},"scheduledAt":{"nullable":true,"type":"number"},"processedAt":{"nullable":true,"type":"number"},"processingStartedAt":{"nullable":true,"type":"number"},"attempts":{"type":"number"},"maxAttempts":{"type":"number"},"error":{"nullable":true,"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","jobId","processorNamespace","status","priority","scheduledAt","attempts","maxAttempts","createdAt"],"additionalProperties":false}},"required":["id","fileId","jobType","input","result","provider","model","inputTokens","outputTokens","totalTokens","completedInMs","createdAt"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/admin/files/chat-with-file":{"post":{"tags":["Administration/Files"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileId":{"type":"string","minLength":1},"message":{"type":"string","minLength":1}},"required":["fileId","message"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"fileId":{"type":"string"},"question":{"type":"string"},"response":{"type":"string"}},"required":["fileId","question","response"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/admin/files/ai-processing-jobs/create":{"post":{"tags":["Administration/Files"],"description":"Create AI processing jobs for multiple files","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"jobType":{"default":"EXTRACTION","type":"string","enum":["EXTRACTION","CLASSIFICATION","FIELD_EXTRACTION"]},"desiredFields":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string"},"fieldExplanation":{"type":"string"}},"required":["fieldName","fieldExplanation"]}}},"required":["fileIds"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/admin/files/statistics":{"get":{"tags":["Administration/Files"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"byBucketName":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"number"}},"required":["name","count"],"additionalProperties":false}},"byFileType":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"number"}},"required":["name","count"],"additionalProperties":false}},"byContentType":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"number"}},"required":["name","count"],"additionalProperties":false}},"byDocumentTextPresence":{"type":"array","items":{"type":"object","properties":{"hasDocumentText":{"type":"boolean"},"count":{"type":"number"}},"required":["hasDocumentText","count"],"additionalProperties":false}}},"required":["byBucketName","byFileType","byContentType","byDocumentTextPresence"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/admin/styles/list":{"post":{"tags":["Administration/Styles"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"createdAt","type":"string","enum":["createdAt","updatedAt","name","gender","typeName"]},"name":{"type":"string"},"nameOrCode":{"type":"string"},"codes":{"type":"object","properties":{"codeId":{"type":"string"},"codeValue":{"type":"string"}}},"description":{"type":"string"},"gender":{"type":"string"},"styleTypeId":{"type":"string"},"styleLevelId":{"type":"string"},"brands":{"type":"array","items":{"type":"string","minLength":1}},"departments":{"type":"array","items":{"type":"string","minLength":1}},"seasons":{"type":"array","items":{"type":"string","minLength":1}},"collections":{"type":"array","items":{"type":"string","minLength":1}},"suppliers":{"type":"array","items":{"type":"string","minLength":1}},"mainSupplier":{"type":"string"},"vendors":{"type":"array","items":{"type":"string","minLength":1}},"linkedCompanyId":{"description":"Match styles where this company id appears in main_supplier, suppliers (CSV), or vendors (CSV).","type":"string","minLength":1},"imagesFileIds":{"type":"array","items":{"type":"string","minLength":1}},"isComponent":{"type":"boolean"},"isStoryActive":{"type":"boolean"},"isArchived":{"default":false,"type":"boolean"},"createdForMe":{"type":"boolean"},"isCreatedForNetwork":{"default":false,"type":"boolean"},"include":{"type":"array","items":{"type":"string","enum":["material","bom","styleProperties","type","styleLink","tracingStory"]}},"companyId":{"type":"string"},"certValidationStandardId":{"type":"string"},"certValidationExpirationDate":{"type":"string"},"certValidationIssueDate":{"type":"string"},"updatedAfterUnixMs":{"type":"number"},"updatedBeforeUnixMs":{"type":"number"}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Retraced-generated unique identifier for this style. Format is a ULID prefixed with 'style_' on newer records; legacy records may use an unprefixed alphanumeric ID. Stable — safe to store and use as a foreign key."},"externalId":{"description":"Your own identifier for this product, if one was supplied on create. Null otherwise.","nullable":true,"type":"string"},"forCompanyId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"description":{"nullable":true,"type":"string","maxLength":4000},"gender":{"nullable":true,"type":"string","maxLength":50},"styleLevelId":{"type":"string","minLength":1,"description":"Retraced taxonomy identifier for the broad product level (e.g. APPAREL_END_CONSUMER_FINISHED_GOODS, FABRICS, TRIM_AND_ACCESSORIES). For the full list of valid values call GET /api/v2/style-types/ and read the parentId field."},"styleTypeId":{"type":"string","minLength":1},"productLevel":{"nullable":true,"type":"string"},"brands":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"departments":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"seasons":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"collections":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"claimIntentions":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"customProperties":{"nullable":true,"type":"string"},"suppliers":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"mainSupplier":{"nullable":true,"type":"string","minLength":1},"vendors":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"imagesFileIds":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"url":{"type":"string"},"previewUrl":{"type":"string"},"fileType":{"nullable":true,"type":"string"},"bucketName":{"type":"string"},"name":{"type":"string"},"fileSize":{"nullable":true,"type":"number"},"contentType":{"nullable":true,"type":"string"},"fileHash":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"createdBy":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByImpersonateName":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"}},"required":["id","url","previewUrl","fileType","bucketName","name","fileSize","contentType","fileHash","createdAt","updatedAt"],"additionalProperties":false}},"isComponent":{"anyOf":[{"type":"boolean"},{"type":"number"}]},"isStoryActive":{"description":"Whether the public traceability page (product story) is active for this product. Activating it requires tracing data (e.g. a supply chain) to be attached to the product first.","anyOf":[{"type":"boolean"},{"type":"number"}]},"isArchived":{"type":"boolean","description":"True if the product has been archived. Archived products are excluded from default API results."},"qrCodeUrl":{"nullable":true,"description":"URL of the product's pre-generated QR code image (an SVG hosted on the Retraced CDN). Null until generation completes, which happens asynchronously after the product is created. The QR image encodes a Retraced-managed forwarding URL that resolves to the product's traceability page once the story is active. The URL is stable once generated — it is not regenerated when product data changes.","type":"string"},"createdAt":{"nullable":true,"description":"ISO 8601 UTC timestamp of when the record was created.","type":"string","format":"date-time"},"updatedAt":{"nullable":true,"description":"ISO 8601 UTC timestamp of when the record was last modified. Use with updatedAfterUnixMs for incremental sync.","type":"string","format":"date-time"},"createdByImpersonateId":{"nullable":true,"type":"string","maxLength":36},"createdByUserId":{"nullable":true,"type":"string","maxLength":36},"createdByCompanyId":{"nullable":true,"type":"string","maxLength":36},"createdByApiKeyId":{"nullable":true,"type":"string","maxLength":36},"createdByApiKeyLabel":{"nullable":true,"type":"string","maxLength":255},"updatedByImpersonateId":{"nullable":true,"type":"string","maxLength":36},"updatedByUserId":{"nullable":true,"type":"string","maxLength":36},"updatedByCompanyId":{"nullable":true,"type":"string","maxLength":36},"updatedByApiKeyId":{"nullable":true,"type":"string","maxLength":36},"updatedByApiKeyLabel":{"nullable":true,"type":"string","maxLength":255},"ecoFootPrint":{"nullable":true,"type":"object","properties":{"syntheticMaterialPercentage":{"nullable":true,"type":"number","minimum":0,"maximum":100},"recycledMaterialPercentage":{"nullable":true,"type":"number","minimum":0,"maximum":100},"hazardousMaterials":{"nullable":true,"type":"array","items":{"type":"object","properties":{"idx":{"type":"number"},"name":{"type":"string","minLength":1},"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["idx","name","percentage"],"additionalProperties":false}},"recyclabilityAbsenceDisruptor":{"nullable":true,"type":"boolean"},"recyclabilityCanBeSorted":{"nullable":true,"type":"boolean"},"recyclabilityCanCollectAtScale":{"nullable":true,"type":"boolean"},"recyclabilityIndustrialScale":{"nullable":true,"type":"boolean"},"recyclabilityRate":{"nullable":true,"type":"number"}},"additionalProperties":false},"weight":{"nullable":true,"type":"object","properties":{"unit":{"type":"string"},"value":{"type":"number"}},"required":["unit","value"],"additionalProperties":false},"tracingStory":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"tracingType":{"type":"string"},"tracingId":{"type":"string"},"isActive":{"type":"boolean"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"tracingName":{"nullable":true,"type":"string"}},"required":["id","tracingType","tracingId","isActive","createdAt","updatedAt"],"additionalProperties":false},"isWeightAvailable":{"description":"True if a weight value has been recorded for this variant.","type":"boolean"},"featureImageUrl":{"nullable":true,"type":"string"},"material":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rawMaterialId":{"type":"string"},"rawMaterialName":{"type":"string"},"percentage":{"nullable":true,"type":"number"},"countriesOfOrigin":{"nullable":true,"type":"string"}},"required":["id","rawMaterialId","rawMaterialName","percentage","countriesOfOrigin"],"additionalProperties":false}}},"required":["id","name"],"additionalProperties":false},"bom":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"styleProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}},"required":["id","name","category"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}},"required":["id","name","category"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}},"required":["id","name","category"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}},"required":["id","name","category"],"additionalProperties":false}}},"additionalProperties":false},"type":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parentId":{"nullable":true,"type":"string"},"quantityUnits":{"nullable":true,"type":"array","items":{"type":"string"}},"weightUnits":{"nullable":true,"type":"array","items":{"type":"string"}}},"required":["id","name","parentId","quantityUnits","weightUnits"],"additionalProperties":false},"linkedStyles":{"type":"array","items":{"type":"object","properties":{"styleId":{"type":"string"}},"required":["styleId"],"additionalProperties":false}},"validationResult":{"type":"object","properties":{"valid":{"type":"boolean"},"selectable":{"type":"boolean"},"description":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false}}},"certificateDuplications":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"},"claimId":{"type":"string"}},"required":["type","text"],"additionalProperties":false}}},"required":["valid","selectable","description","certificateDuplications"],"additionalProperties":false}},"required":["id","forCompanyId","name","codes","styleLevelId","styleTypeId","isArchived"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/admin/attachment-templates/":{"get":{"tags":["Administration/Attachment Templates"],"parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"count","required":false},{"schema":{"type":"string"},"in":"query","name":"name","required":false},{"schema":{"type":"string","enum":["PRODUCT_BACKWARD","FIBER_FORWARD","FIBER_PRODUCT_TRANSFORMATION"]},"in":"query","name":"tracingType","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"isGlobal":{"type":"boolean"},"isArchived":{"type":"boolean"},"isActive":{"type":"boolean"},"isPreference":{"type":"boolean"},"tracingType":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","description","companyId","isGlobal","isArchived","isActive","isPreference","tracingType","createdAt","updatedAt"],"additionalProperties":false}}},"required":["meta","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"post":{"tags":["Administration/Attachment Templates"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"nullable":true,"type":"string"},"tracingType":{"type":"string","minLength":1},"isActive":{"default":true,"type":"boolean"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"isBackupRule":{"default":false,"type":"boolean"},"idx":{"type":"integer","minimum":0,"maximum":9007199254740991},"facilityProcessIds":{"default":[],"type":"array","items":{"type":"string"}},"documents":{"default":[],"type":"array","items":{"type":"object","properties":{"documentType":{"type":"string","minLength":1},"isMandatory":{"type":"boolean"},"isAppliedToAllCountries":{"type":"boolean"},"idx":{"type":"integer","minimum":0,"maximum":9007199254740991},"countryCodes":{"default":[],"type":"array","items":{"type":"string"}}},"required":["documentType","isMandatory","isAppliedToAllCountries","idx"]}}},"required":["idx"]}}},"required":["name","tracingType"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"isGlobal":{"type":"boolean"},"isArchived":{"type":"boolean"},"isActive":{"type":"boolean"},"isPreference":{"type":"boolean"},"tracingType":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","description","companyId","isGlobal","isArchived","isActive","isPreference","tracingType","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/attachment-templates/{id}":{"get":{"tags":["Administration/Attachment Templates"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"isGlobal":{"type":"boolean"},"isArchived":{"type":"boolean"},"isActive":{"type":"boolean"},"isPreference":{"type":"boolean"},"tracingType":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","description","companyId","isGlobal","isArchived","isActive","isPreference","tracingType","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"patch":{"tags":["Administration/Attachment Templates"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"nullable":true,"type":"string"},"tracingType":{"type":"string","minLength":1},"isActive":{"default":true,"type":"boolean"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"isBackupRule":{"default":false,"type":"boolean"},"idx":{"type":"integer","minimum":0,"maximum":9007199254740991},"facilityProcessIds":{"default":[],"type":"array","items":{"type":"string"}},"documents":{"default":[],"type":"array","items":{"type":"object","properties":{"documentType":{"type":"string","minLength":1},"isMandatory":{"type":"boolean"},"isAppliedToAllCountries":{"type":"boolean"},"idx":{"type":"integer","minimum":0,"maximum":9007199254740991},"countryCodes":{"default":[],"type":"array","items":{"type":"string"}}},"required":["documentType","isMandatory","isAppliedToAllCountries","idx"]}}},"required":["idx"]}}},"required":["name","tracingType"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/attachment-templates/{id}/details":{"get":{"tags":["Administration/Attachment Templates"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"isGlobal":{"type":"boolean"},"isArchived":{"type":"boolean"},"isActive":{"type":"boolean"},"isPreference":{"type":"boolean"},"tracingType":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"idx":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"isBackupRule":{"type":"boolean"},"facilityProcesses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"}},"required":["id","name"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"documentType":{"type":"string"},"documentClass":{"type":"string","enum":["TRANSACTIONAL","COMPANY","PRODUCT"]},"title":{"nullable":true,"type":"string"},"isMandatory":{"type":"boolean"},"isAppliedToAllCountries":{"type":"boolean"},"idx":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"countryCodes":{"type":"array","items":{"type":"string"}}},"required":["id","documentType","documentClass","title","isMandatory","isAppliedToAllCountries","idx","countryCodes"],"additionalProperties":false}}},"required":["id","idx","isBackupRule","facilityProcesses","documents"],"additionalProperties":false}},"backupRule":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"idx":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"isBackupRule":{"type":"boolean"},"facilityProcesses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"}},"required":["id","name"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"documentType":{"type":"string"},"documentClass":{"type":"string","enum":["TRANSACTIONAL","COMPANY","PRODUCT"]},"title":{"nullable":true,"type":"string"},"isMandatory":{"type":"boolean"},"isAppliedToAllCountries":{"type":"boolean"},"idx":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"countryCodes":{"type":"array","items":{"type":"string"}}},"required":["id","documentType","documentClass","title","isMandatory","isAppliedToAllCountries","idx","countryCodes"],"additionalProperties":false}}},"required":["id","idx","isBackupRule","facilityProcesses","documents"],"additionalProperties":false},"hasOrders":{"type":"boolean"}},"required":["id","name","description","companyId","isGlobal","isArchived","isActive","isPreference","tracingType","createdAt","updatedAt","rules","backupRule","hasOrders"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/attachment-templates/{id}/archive":{"post":{"tags":["Administration/Attachment Templates"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/network-onboarding/inspect":{"get":{"summary":"Inspect an uploaded onboarding spreadsheet (admin only)","tags":["Administration/Network Onboarding"],"description":"Lists the workbook sheets with their most likely header rows, the platform fields a column can be mapped onto, and — when sheetName, headerRow and a mapping containing `country` are supplied — every distinct country value with its resolution.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"fileId","required":true},{"schema":{"type":"string","minLength":1},"in":"query","name":"sheetName","required":false},{"schema":{"type":"integer","minimum":1,"maximum":1000},"in":"query","name":"headerRow","required":false},{"schema":{"type":"string"},"in":"query","name":"mapping","required":false},{"schema":{"type":"string"},"in":"query","name":"countryAliases","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"sheets":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"rowCount":{"type":"number"},"columnCount":{"type":"number"},"headerCandidates":{"type":"array","items":{"type":"object","properties":{"rowNumber":{"type":"number"},"filledCells":{"type":"number"},"headers":{"type":"array","items":{"type":"string"}}},"required":["rowNumber","filledCells","headers"],"additionalProperties":false}}},"required":["name","rowCount","columnCount","headerCandidates"],"additionalProperties":false}},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"description":{"nullable":true,"type":"string"},"templateId":{"type":"string"},"kind":{"type":"string"},"usage":{"type":"string"},"required":{"type":"boolean"},"enumValues":{"nullable":true,"type":"array","items":{"type":"string"}}},"required":["key","label","description","templateId","kind","usage","required","enumValues"],"additionalProperties":false}},"countryPreflight":{"nullable":true,"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"occurrences":{"type":"number"},"resolved":{"type":"boolean"},"code":{"nullable":true,"type":"string"},"via":{"nullable":true,"type":"string"}},"required":["value","occurrences","resolved","code","via"],"additionalProperties":false}},"unresolvedValues":{"type":"array","items":{"type":"string"}}},"required":["entries","unresolvedValues"],"additionalProperties":false}},"required":["sheets","fields","countryPreflight"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"413":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/network-onboarding/batches":{"post":{"summary":"Analyze a supplier-network spreadsheet for a company (admin only)","tags":["Administration/Network Onboarding"],"description":"Validates the mapping and resolves every country value up front, then queues the analysis. Returns a batchId to poll. Nothing is written to the company tables until the batch is applied.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"targetCompanyId":{"type":"string","minLength":1,"maxLength":36},"fileId":{"type":"string","minLength":1,"maxLength":36},"sheetName":{"type":"string","minLength":1},"headerRow":{"type":"integer","minimum":1,"maximum":1000},"mapping":{"type":"object","additionalProperties":{"type":"string"}},"countryAliases":{"type":"object","additionalProperties":{"type":"string","pattern":"^[A-Za-z]{2}$"}},"defaults":{"type":"object","additionalProperties":{"type":"string"}},"label":{"type":"string","maxLength":255}},"required":["targetCompanyId","fileId","sheetName","headerRow","mapping"]}}}},"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"batchId":{"type":"string"},"rowsDetected":{"type":"number"}},"required":["batchId","rowsDetected"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"413":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/network-onboarding/batches/{batchId}":{"get":{"summary":"Get an onboarding batch with its row counts (admin only)","tags":["Administration/Network Onboarding"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"batchId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"targetCompanyId":{"type":"string"},"fileId":{"type":"string"},"sheetName":{"type":"string"},"headerRow":{"type":"number"},"label":{"nullable":true,"type":"string"},"status":{"type":"string"},"error":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"counts":{"type":"object","properties":{"total":{"type":"number"},"decision":{"type":"object","additionalProperties":{"type":"number"}},"reasonCode":{"type":"object","additionalProperties":{"type":"number"}},"applyStatus":{"type":"object","additionalProperties":{"type":"number"}}},"required":["total","decision","reasonCode","applyStatus"],"additionalProperties":false}},"required":["id","targetCompanyId","fileId","sheetName","headerRow","label","status","error","createdAt","updatedAt","counts"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/network-onboarding/batches/{batchId}/rows":{"get":{"summary":"List the rows of an onboarding batch (admin only)","tags":["Administration/Network Onboarding"],"parameters":[{"schema":{"type":"string","enum":["MATCH","CREATE","FLAGGED","SKIP"]},"in":"query","name":"decision","required":false},{"schema":{"type":"string"},"in":"query","name":"reasonCode","required":false},{"schema":{"type":"string","enum":["PENDING","APPLIED","SKIPPED","FAILED"]},"in":"query","name":"applyStatus","required":false},{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":100,"type":"integer","minimum":1,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","minLength":1},"in":"path","name":"batchId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sourceRowNumber":{"type":"number"},"raw":{"type":"object","additionalProperties":{"type":"string"}},"mapped":{"type":"object","additionalProperties":{}},"decision":{"type":"string"},"decidedBy":{"type":"string"},"reasonCode":{"nullable":true,"type":"string"},"reason":{"nullable":true,"type":"string"},"suggestedAction":{"nullable":true,"type":"string"},"matchedCompanyId":{"nullable":true,"type":"string"},"confidence":{"nullable":true,"type":"number"},"flags":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"differingFields":{"nullable":true,"type":"array","items":{"type":"string"}},"otherSourceRowNumber":{"nullable":true,"type":"number"}},"required":["code","message","differingFields","otherSourceRowNumber"],"additionalProperties":false}},"duplicateOfRowId":{"nullable":true,"type":"string"},"applyStatus":{"type":"string"},"createdCompanyId":{"nullable":true,"type":"string"},"applyError":{"nullable":true,"type":"string"},"reviewedByUserId":{"nullable":true,"type":"string"},"reviewedAt":{"nullable":true,"type":"string"},"candidates":{"type":"array","items":{"type":"object","properties":{"rank":{"type":"number"},"companyId":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"vectorSimilarity":{"type":"number"},"stringSimilarity":{"type":"number"},"matchScore":{"type":"number"},"countryMatch":{"type":"boolean"},"facilityProcessMatch":{"type":"boolean"},"alreadyLinkedToTarget":{"type":"boolean"}},"required":["rank","companyId","officialName","country","vectorSimilarity","stringSimilarity","matchScore","countryMatch","facilityProcessMatch","alreadyLinkedToTarget"],"additionalProperties":false}}},"required":["id","sourceRowNumber","raw","mapped","decision","decidedBy","reasonCode","reason","suggestedAction","matchedCompanyId","confidence","flags","duplicateOfRowId","applyStatus","createdCompanyId","applyError","reviewedByUserId","reviewedAt","candidates"],"additionalProperties":false}}},"required":["meta","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/network-onboarding/batches/{batchId}/export":{"get":{"summary":"Export an onboarding batch analysis as Excel (admin only)","tags":["Administration/Network Onboarding"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"batchId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"fileId":{"type":"string"},"fileName":{"type":"string"},"downloadUrl":{"type":"string"}},"required":["fileId","fileName","downloadUrl"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/network-onboarding/batches/{batchId}/rows/{rowId}":{"patch":{"summary":"Override the decision on one onboarding row (admin only)","tags":["Administration/Network Onboarding"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["MATCH","CREATE","SKIP"]},"matchedCompanyId":{"nullable":true,"type":"string","minLength":1,"maxLength":36},"overrides":{"type":"object","additionalProperties":{"type":"string"}},"reviewNote":{"type":"string","maxLength":2000}},"required":["decision"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"batchId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"rowId","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/network-onboarding/batches/{batchId}/review-import":{"post":{"summary":"Apply reviewed decisions from an edited report (admin only)","tags":["Administration/Network Onboarding"],"description":"Reads the review columns of a previously exported batch report and applies each decision. A blank action leaves the analysed decision alone, so only the rows a reviewer disagreed with need filling in.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileId":{"type":"string","minLength":1,"maxLength":36}},"required":["fileId"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"batchId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"applied":{"type":"number"},"skipped":{"type":"number"},"problems":{"type":"array","items":{"type":"object","properties":{"sheetRow":{"type":"number"},"message":{"type":"string"}},"required":["sheetRow","message"],"additionalProperties":false}}},"required":["applied","skipped","problems"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"413":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/network-onboarding/batches/{batchId}/apply":{"post":{"summary":"Apply the reviewed decisions of an onboarding batch (admin only)","tags":["Administration/Network Onboarding"],"description":"Queues creation and linking for every MATCH/CREATE row, or just the rows given in rowIds. Safe to re-run: rows already applied are skipped.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rowIds":{"maxItems":5000,"type":"array","items":{"type":"string","minLength":1}}}}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"batchId","required":true}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"batchId":{"type":"string"},"queuedRowCount":{"nullable":true,"type":"number"}},"required":["batchId","queuedRowCount"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/platform-features/":{"get":{"summary":"List platform features with enabled company count","tags":["Administration/Platform Features"],"description":"Returns all platform features with the count of enabled companies. Excludes removed companies from the count. When `companyId` is provided, each feature is additionally annotated with `isEnabledForCompany` and `companyPlatformFeatureUpdatedAt` scoped to that company, and the network-inherited feature (`capa-v2`) carries `inheritedFrom` — the linked companies that grant it even when the company has no toggle of its own.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"companyId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"isActive":{"type":"number"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"enabledCompaniesCount":{"type":"number"},"isEnabledForCompany":{"type":"boolean"},"companyPlatformFeatureUpdatedAt":{"nullable":true,"type":"string","format":"date-time"},"inheritedFrom":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["id","name","description","isActive","createdAt","updatedAt","createdByUserId","updatedByUserId","enabledCompaniesCount"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/platform-features/{id}":{"get":{"summary":"Get a platform feature by id","tags":["Administration/Platform Features"],"description":"Returns the full metadata for a single platform feature.","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"isActive":{"type":"number"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"}},"required":["id","name","description","isActive","createdAt","updatedAt","createdByUserId","updatedByUserId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a platform feature","tags":["Administration/Platform Features"],"description":"Updates feature metadata and/or enables or disables the feature for a set of companies.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"isActive":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"enableCompanies":{"type":"array","items":{"type":"string","minLength":1}},"disableCompanies":{"type":"array","items":{"type":"string","minLength":1}}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"isActive":{"type":"number"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"}},"required":["id","name","description","isActive","createdAt","updatedAt","createdByUserId","updatedByUserId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/questionnaires/templates/":{"get":{"summary":"List questionnaire templates for the Retraced admin","tags":["Administration/Questionnaire Templates"],"description":"Paginated, filterable, sortable list of questionnaire templates. By default returns Retraced-published active templates plus the admin company's own; `myTemplates` narrows it to the caller company's templates regardless of their active flag.","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":15,"type":"integer","minimum":0,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","pattern":"^((name|createdAt|updatedAt|questionCount|timesUsedAsTemplate|isActive):(ASC|DESC))(,(name|createdAt|updatedAt|questionCount|timesUsedAsTemplate|isActive):(ASC|DESC))*$"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"in":"query","name":"myTemplates","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["ACTIVE","COMPLETED","DRAFT"]},"isRetraced":{"type":"string","enum":["YES","NO"]},"isTemplate":{"type":"number"},"templateId":{"nullable":true,"type":"string"},"questionCount":{"nullable":true,"type":"number"},"invitedCompanies":{"nullable":true,"type":"number"},"timesUsedAsTemplate":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"firstRequestDate":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"statistics":{"nullable":true,"type":"object","properties":{"totalApprovedResponses":{"nullable":true,"type":"number"},"totalInReviewResponses":{"nullable":true,"type":"number"},"totalDeniedResponses":{"nullable":true,"type":"number"},"totalMissingResponses":{"nullable":true,"type":"number"},"totalQuestions":{"nullable":true,"type":"number"},"approvedResponsesPercentage":{"nullable":true,"type":"number"},"inReviewResponsesPercentage":{"nullable":true,"type":"number"},"deniedResponsesPercentage":{"nullable":true,"type":"number"},"missingResponsesPercentage":{"nullable":true,"type":"number"},"totalOpenRequests":{"nullable":true,"type":"number"},"totalInReviewRequests":{"nullable":true,"type":"number"},"totalCompletedRequests":{"nullable":true,"type":"number"},"totalCompaniesInvited":{"nullable":true,"type":"number"},"totalRequestChanges":{"nullable":true,"type":"number"}},"additionalProperties":false}},"required":["id","companyId","name","status","isRetraced","isTemplate"],"additionalProperties":{}}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"post":{"summary":"Create a questionnaire template as the Retraced admin","tags":["Administration/Questionnaire Templates"],"description":"Creates an empty draft template. The admin twin of `POST /api/questionnaires/templates` — same write, same service, but gated on `admin:questionnaire:create`, which only `RETRACED_ADMIN` holds. Every template created here is therefore Retraced-owned and starts inactive, so it stays out of the shared pool until it is switched on. Nothing is cloned and the name is not checked for uniqueness: one company may hold several templates under one name.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","minLength":1,"maxLength":500}},"required":["name"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"isRetraced":{"nullable":true,"type":"string"},"isTemplate":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isActive":{"nullable":true,"type":"number"},"templateId":{"nullable":true,"type":"string"},"statistics":{"nullable":true,"type":"object","properties":{},"additionalProperties":{}}},"required":["id"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete questionnaire templates as the Retraced admin","tags":["Administration/Questionnaire Templates"],"description":"Permanently deletes the given questionnaire templates. All-or-nothing: every id must belong to the calling company and be a template, and none may be Retraced-owned unless the caller is a Retraced admin — otherwise nothing is deleted. The rows are removed rather than flagged, and their sections and questions are orphaned rather than deleted, as in the legacy route. The tenant twin is `DELETE /api/questionnaires/templates`; this one is guarded on the admin right instead.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"templateIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["templateIds"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/questionnaires/templates/{id}":{"get":{"summary":"Get a questionnaire template with its sections and questions","tags":["Administration/Questionnaire Templates"],"description":"The read behind the Retraced-admin template builder: one questionnaire plus its sections and questions, each ordered by sort order. Questions carry their `meta` blob both nested and flattened onto the question itself, and an attachment question additionally carries a 24-hour signed `attachmentFileUrl`. The questionnaire must belong to the calling company — another company's is indistinguishable from a missing one and answers 404. Archived questionnaires are returned.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"isRetraced":{"nullable":true,"type":"string"},"isTemplate":{"nullable":true,"type":"boolean"},"isArchived":{"nullable":true,"type":"number"},"isActive":{"nullable":true,"type":"number"},"templateId":{"nullable":true,"type":"string"},"statistics":{"nullable":true,"type":"object","properties":{"totalApprovedResponses":{"nullable":true,"type":"number"},"totalInReviewResponses":{"nullable":true,"type":"number"},"totalDeniedResponses":{"nullable":true,"type":"number"},"totalMissingResponses":{"nullable":true,"type":"number"},"totalQuestions":{"nullable":true,"type":"number"},"approvedResponsesPercentage":{"nullable":true,"type":"number"},"inReviewResponsesPercentage":{"nullable":true,"type":"number"},"deniedResponsesPercentage":{"nullable":true,"type":"number"},"missingResponsesPercentage":{"nullable":true,"type":"number"},"totalOpenRequests":{"nullable":true,"type":"number"},"totalInReviewRequests":{"nullable":true,"type":"number"},"totalCompletedRequests":{"nullable":true,"type":"number"},"totalCompaniesInvited":{"nullable":true,"type":"number"},"totalRequestChanges":{"nullable":true,"type":"number"}},"additionalProperties":false},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"isRetraced":{"nullable":true,"type":"string"},"sortOrder":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"sortOrder":{"nullable":true,"type":"number"},"questionTypeId":{"nullable":true,"type":"string"},"questionnaireSectionId":{"nullable":true,"type":"string"},"retracedDatapointId":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"sectionId":{"nullable":true,"type":"string"},"isCustom":{"type":"boolean"},"meta":{"type":"object","properties":{},"additionalProperties":{}}},"required":["id","isCustom","meta"],"additionalProperties":{}}}},"required":["id","sections","questions"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"put":{"summary":"Save a questionnaire template as the Retraced admin","tags":["Administration/Questionnaire Templates"],"description":"The save behind the Retraced-admin template builder. The admin twin of `PUT /api/questionnaires/:id/builder` — same write, same service — but gated on `admin:questionnaire:write`, which only `RETRACED_ADMIN` holds. `sections` and `questions` are the complete desired content, not a patch: rows present are created or updated, rows absent are deleted along with their answers and comments. `name` and `description` are always written; `status` is not settable here and keeps its stored value. A template stores no deadline of its own, so `dueDate` is always written as null — send it as null or omit it. The questionnaire must belong to the calling company — another company's is indistinguishable from a missing one and answers 404 — and a Retraced-owned questionnaire may only be saved by a Retraced admin, which this guard already guarantees. `templates` names the surface, not a filter: no `is_template` predicate is applied, so any questionnaire the caller company owns can be saved here. Once answer requests exist, an existing question's title, type, mandatory flag and options are frozen; adding a new question instead reopens every request so it can be answered. Answers the saved questionnaire in the same shape as the template builder read.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"dueDate":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"string","nullable":true,"enum":[null]}]},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":64},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"string","nullable":true,"enum":[null]}]},"sortOrder":{"type":"number","minimum":1}},"required":["id","name","sortOrder"]}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"sectionId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"anyOf":[{"type":"string","maxLength":10000},{"type":"string","nullable":true,"enum":[null]}]},"questionTypeId":{"type":"string"},"retracedDatapointId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"isCustom":{"type":"boolean"},"meta":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"string","nullable":true,"enum":[null]}]},"sortOrder":{"type":"number","minimum":1}},"required":["id","sectionId","title","questionTypeId","isCustom"]}}},"required":["name","sections","questions"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"isRetraced":{"nullable":true,"type":"string"},"isTemplate":{"nullable":true,"type":"boolean"},"isArchived":{"nullable":true,"type":"number"},"isActive":{"nullable":true,"type":"number"},"templateId":{"nullable":true,"type":"string"},"statistics":{"nullable":true,"type":"object","properties":{"totalApprovedResponses":{"nullable":true,"type":"number"},"totalInReviewResponses":{"nullable":true,"type":"number"},"totalDeniedResponses":{"nullable":true,"type":"number"},"totalMissingResponses":{"nullable":true,"type":"number"},"totalQuestions":{"nullable":true,"type":"number"},"approvedResponsesPercentage":{"nullable":true,"type":"number"},"inReviewResponsesPercentage":{"nullable":true,"type":"number"},"deniedResponsesPercentage":{"nullable":true,"type":"number"},"missingResponsesPercentage":{"nullable":true,"type":"number"},"totalOpenRequests":{"nullable":true,"type":"number"},"totalInReviewRequests":{"nullable":true,"type":"number"},"totalCompletedRequests":{"nullable":true,"type":"number"},"totalCompaniesInvited":{"nullable":true,"type":"number"},"totalRequestChanges":{"nullable":true,"type":"number"}},"additionalProperties":false},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"isRetraced":{"nullable":true,"type":"string"},"sortOrder":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"sortOrder":{"nullable":true,"type":"number"},"questionTypeId":{"nullable":true,"type":"string"},"questionnaireSectionId":{"nullable":true,"type":"string"},"retracedDatapointId":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"sectionId":{"nullable":true,"type":"string"},"isCustom":{"type":"boolean"},"meta":{"type":"object","properties":{},"additionalProperties":{}}},"required":["id","isCustom","meta"],"additionalProperties":{}}}},"required":["id","sections","questions"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"patch":{"summary":"Publish or hide a questionnaire template as the Retraced admin","tags":["Administration/Questionnaire Templates"],"description":"Flips the `isActive` flag on a Retraced-owned template. `1` publishes it into the shared pool, where it appears in every company's template picker; `0` withdraws it while leaving it listed and editable in the admin templates table. Only Retraced-owned templates are reachable — a company-owned template answers 404, whichever company the caller belongs to. Nothing else on the template is writable here: the name and content go through `PUT /api/admin/questionnaires/templates/:id`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"isActive":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]}},"required":["isActive"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/questionnaires/templates/{id}/copy":{"post":{"summary":"Clone a questionnaire template as the Retraced admin","tags":["Administration/Questionnaire Templates"],"description":"Copies a Retraced-owned template, its sections and its questions into a brand-new draft template named \"Copy of …\". The admin twin of `POST /api/questionnaires/:id/save-as-template` — same clone, same service — but gated on `admin:questionnaire:create`, which only `RETRACED_ADMIN` holds. The source is looked up across companies and must be Retraced-owned: a company-owned questionnaire answers 403 `cannot_clone_template`, an unknown id 404. The clone belongs to the source's company, carries no answer requests or responses, and starts inactive so it stays out of the shared template pool until it is switched on.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"isRetraced":{"nullable":true,"type":"string"},"isTemplate":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isActive":{"nullable":true,"type":"number"},"templateId":{"nullable":true,"type":"string"},"statistics":{"nullable":true,"type":"object","properties":{},"additionalProperties":{}}},"required":["id"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/user-companies/available-companies/{userId}":{"get":{"summary":"List companies a user can be added to","tags":["Administration/User Companies"],"description":"Unscoped list of companies the given user does not already belong to, for the admin \"add company to user\" picker. Excludes the internal Retraced house company.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"q","required":false},{"schema":{"type":"string","pattern":"^[a-zA-Z]+:(ASC|DESC|asc|desc)$"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","minLength":1},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"officialName":{"type":"string"},"name":{"type":"string"},"country":{"type":"string"},"countryName":{"type":"string"},"featuredImageFileId":{"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"type":"string"},"videoFileUrl":{"type":"string","nullable":true,"enum":[null]},"imageList":{"type":"array","items":{}},"geojson":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","officialName","name","country","countryName","featuredImageFileId","featuredImageFileUrl","originalFeaturedImageFileUrl","videoFileUrl","imageList","geojson","facilityProcesses","updatedAt"],"additionalProperties":{}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/user-companies/{id}":{"delete":{"summary":"Remove a user from a company","tags":["Administration/User Companies"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a user's role or primary company","tags":["Administration/User Companies"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["RETRACED_ADMIN","RETRACED_SALES","RETRACED_PRODUCT_DEVELOPMENT","RETRACED_CUSTOMER_SUCCESS","RETRACED_MARKETING","COMPANY_OWNER","EMPLOYEE"]},"isPrimary":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string"},"userId":{"type":"string"},"companyId":{"type":"string"},"isPrimary":{"type":"boolean"}},"required":["id","role","userId","companyId","isPrimary"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/user-companies/":{"post":{"summary":"Add a user to a company","tags":["Administration/User Companies"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1},"userId":{"type":"string","minLength":1},"role":{"type":"string","enum":["RETRACED_ADMIN","RETRACED_SALES","RETRACED_PRODUCT_DEVELOPMENT","RETRACED_CUSTOMER_SUCCESS","RETRACED_MARKETING","COMPANY_OWNER","EMPLOYEE"]}},"required":["companyId","userId","role"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"companyId":{"type":"string"},"role":{"type":"string"},"isPrimary":{"type":"boolean"},"hasAgreedWithTerms":{"type":"boolean"}},"required":["id","userId","companyId","role","isPrimary","hasAgreedWithTerms"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/user-companies/{userId}":{"get":{"summary":"List a user's companies","tags":["Administration/User Companies"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"userId":{"type":"string"},"role":{"type":"string"},"isPrimary":{"type":"boolean"},"hasAgreedWithTerms":{"type":"boolean"},"hasAgreedWithTermsAt":{"nullable":true,"type":"string"},"userActivationLastNotifiedAt":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"isActiveCompany":{"type":"number"}},"required":["id","companyId","userId","role","isPrimary","hasAgreedWithTerms","hasAgreedWithTermsAt","userActivationLastNotifiedAt","name","officialName","facilityProcesses","isActiveCompany"],"additionalProperties":{}}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","pageSize","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/users/list":{"get":{"summary":"List users across all companies (admin only, delegated path)","tags":["Administration/Users"],"description":"Paginated, filterable, sortable list of users joined with `user_companies` — a user appears once per company they belong to. Enriches each row with `companyName` and `primaryCompanyName`.","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":15,"type":"integer","minimum":0,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","pattern":"^[a-zA-Z]+:(ASC|DESC|asc|desc)$"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":255},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"in":"query","name":"withDelegatedUsers","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"nullable":true,"type":"string"},"lastName":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"}},"required":["id","firstName","lastName","email"],"additionalProperties":{}}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","pageSize","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/users/list-to-impersonate":{"get":{"summary":"List users who can be impersonated (admin only)","tags":["Administration/Users"],"description":"Powers the admin \"impersonate a user\" search-select dropdown. Excludes Retraced staff roles and users who have not agreed to the terms and conditions.","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":15,"type":"integer","minimum":0,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","pattern":"^[a-zA-Z]+:(ASC|DESC|asc|desc)$"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"nullable":true,"type":"string"},"lastName":{"nullable":true,"type":"string"},"primaryRole":{"nullable":true,"type":"string"},"primaryCompanyId":{"nullable":true,"type":"string"},"companyName":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"}},"required":["id","firstName","lastName","primaryRole","primaryCompanyId","companyName","companyId"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","pageSize","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/users/list-by-company/{companyId}":{"get":{"summary":"List users belonging to a company (admin only)","tags":["Administration/Users"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"companyId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fullName":{"nullable":true,"type":"string"}},"required":["id","fullName"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","pageSize","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/users/{id}/impersonate":{"get":{"summary":"Impersonate a user (admin only)","tags":["Administration/Users"],"description":"Returns the target user merged with their impersonated company (primary company, or `companyId` when the user has none), matching the shape of a normal login response.","parameters":[{"schema":{"type":"string"},"in":"query","name":"companyId","required":false},{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"nullable":true,"type":"string"},"lastName":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"primaryCompanyId":{"nullable":true,"type":"string"},"primaryRole":{"nullable":true,"type":"string"},"role":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"company":{"type":"object","properties":{"id":{"type":"string"},"officialName":{"type":"string"},"name":{"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"transliteratedOfficialName":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"country":{"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"facilityProcesses":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","additionalProperties":{}}},"workosOrganizationId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"shopId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"type":"number"},"isClientCompany":{"nullable":true,"type":"number"},"enabledFeatures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"}},"required":["id","name","description"],"additionalProperties":false}}},"required":["id","officialName","name","country","enabledFeatures"],"additionalProperties":{}},"userCompanies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"userId":{"type":"string"},"role":{"type":"string"},"isPrimary":{"type":"boolean"},"hasAgreedWithTerms":{"type":"boolean"},"hasAgreedWithTermsAt":{"nullable":true,"type":"string"},"userActivationLastNotifiedAt":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"isActiveCompany":{"type":"number"}},"required":["id","companyId","userId","role","isPrimary","hasAgreedWithTerms","hasAgreedWithTermsAt","userActivationLastNotifiedAt","name","officialName","facilityProcesses","isActiveCompany"],"additionalProperties":{}}},"appFeatures":{"type":"array","items":{}},"preferences":{"type":"object","additionalProperties":{}},"enabledDevelopmentTags":{"type":"array","items":{"type":"object","properties":{"featureId":{"type":"string"},"tag":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"isEnabled":{"type":"number"}},"required":["featureId","tag","name","description","isEnabled"],"additionalProperties":false}}},"required":["id","firstName","lastName","email","primaryCompanyId","primaryRole","role","userCompanies","appFeatures","preferences","enabledDevelopmentTags"],"additionalProperties":{}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/users/bulk-invite":{"post":{"summary":"Bulk-invite users into supplier companies (admin only)","tags":["Administration/Users"],"description":"Queues a background job that creates users (and emails them a login/ welcome link) inside supplier companies that are linked to the given parent company. Companies not linked to the parent are skipped. Returns a `requestId` to poll for status and the generated Excel report link.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"parentCompanyId":{"type":"string","minLength":1},"role":{"type":"string","minLength":1},"rows":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"firstName":{"type":"string","minLength":1,"maxLength":255},"lastName":{"nullable":true,"type":"string","maxLength":255}},"required":["companyId","email","firstName"]}}},"required":["parentCompanyId","role","rows"]}}}},"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"requestId":{"type":"string"}},"required":["requestId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/users/bulk-invite/status/{requestId}":{"get":{"summary":"Get the status of a bulk-invite request (admin only)","tags":["Administration/Users"],"description":"Returns the live status of a queued bulk-invite job. When `status` is `done`, `summary` (created/skipped/failed counts) and `downloadUrl` (signed link to the Excel report) are included.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"requestId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"status":{"type":"string","enum":["processing","done","failed"]},"total":{"type":"number"},"summary":{"type":"object","properties":{"total":{"type":"number"},"created":{"type":"number"},"granted":{"type":"number"},"skipped":{"type":"number"},"failed":{"type":"number"}},"required":["total","created","granted","skipped","failed"],"additionalProperties":false},"downloadUrl":{"type":"string"},"error":{"type":"string"}},"required":["status","total"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/users/bulk-patch":{"patch":{"summary":"Bulk-patch users' isBlocked field (admin only)","tags":["Administration/Users"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"isBlocked":{"type":"boolean"}},"required":["id"]}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"nullable":true,"type":"string"},"lastName":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"primaryCompanyId":{"nullable":true,"type":"string"},"primaryRole":{"nullable":true,"type":"string"},"langId":{"nullable":true,"type":"string"},"isBlocked":{"type":"boolean"},"developmentTag":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"},"originalAvatarFileUrl":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","firstName","lastName","email","primaryCompanyId","primaryRole","langId","isBlocked","developmentTag","avatarFileUrl","originalAvatarFileUrl","updatedAt"],"additionalProperties":{}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/users/{id}":{"delete":{"summary":"Delete a user (admin only)","tags":["Administration/Users"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"get":{"summary":"Get a user by id, merged with their primary company (admin only)","tags":["Administration/Users"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"nullable":true,"type":"string"},"lastName":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"primaryCompanyId":{"nullable":true,"type":"string"},"primaryRole":{"nullable":true,"type":"string"},"role":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"type":"string"},"name":{"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"transliteratedOfficialName":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"country":{"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"facilityProcesses":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","additionalProperties":{}}},"workosOrganizationId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"shopId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"type":"number"},"isClientCompany":{"nullable":true,"type":"number"},"enabledFeatures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"}},"required":["id","name","description"],"additionalProperties":false}}},"required":["id","officialName","name","country","enabledFeatures"],"additionalProperties":{}},"userCompanies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"userId":{"type":"string"},"role":{"type":"string"},"isPrimary":{"type":"boolean"},"hasAgreedWithTerms":{"type":"boolean"},"hasAgreedWithTermsAt":{"nullable":true,"type":"string"},"userActivationLastNotifiedAt":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"isActiveCompany":{"type":"number"}},"required":["id","companyId","userId","role","isPrimary","hasAgreedWithTerms","hasAgreedWithTermsAt","userActivationLastNotifiedAt","name","officialName","facilityProcesses","isActiveCompany"],"additionalProperties":{}}},"appFeatures":{"type":"array","items":{}},"preferences":{"type":"object","additionalProperties":{}},"enabledDevelopmentTags":{"type":"array","items":{"type":"object","properties":{"featureId":{"type":"string"},"tag":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"isEnabled":{"type":"number"}},"required":["featureId","tag","name","description","isEnabled"],"additionalProperties":false}}},"required":["id","firstName","lastName","email","primaryCompanyId","primaryRole","role","companyId","company","userCompanies","appFeatures","preferences","enabledDevelopmentTags"],"additionalProperties":{}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"patch":{"summary":"Patch a user's isBlocked/developmentTag fields (admin only)","tags":["Administration/Users"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"isBlocked":{"nullable":true,"type":"boolean"},"developmentTag":{"type":"string","enum":["EXPERIMENTAL","ALPHA","BETA"]}}}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"nullable":true,"type":"string"},"lastName":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"primaryCompanyId":{"nullable":true,"type":"string"},"primaryRole":{"nullable":true,"type":"string"},"role":{"nullable":true,"type":"string"},"langId":{"nullable":true,"type":"string"},"isBlocked":{"type":"boolean"},"developmentTag":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"},"originalAvatarFileUrl":{"nullable":true,"type":"string"},"enabledDevelopmentTags":{"type":"array","items":{"type":"object","properties":{"featureId":{"type":"string"},"tag":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"isEnabled":{"type":"number"}},"required":["featureId","tag","name","description","isEnabled"],"additionalProperties":false}},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","firstName","lastName","email","primaryCompanyId","primaryRole","role","langId","isBlocked","developmentTag","avatarFileUrl","originalAvatarFileUrl","enabledDevelopmentTags","updatedAt"],"additionalProperties":{}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"put":{"summary":"Fully update a user (admin only)","tags":["Administration/Users"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"nullable":true,"type":"string"},"lastName":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"langId":{"nullable":true,"type":"string"},"isBlocked":{"type":"boolean"},"developmentTag":{"nullable":true,"type":"string","enum":["EXPERIMENTAL","ALPHA","BETA"]}}}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"nullable":true,"type":"string"},"lastName":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"primaryCompanyId":{"nullable":true,"type":"string"},"primaryRole":{"nullable":true,"type":"string"},"role":{"nullable":true,"type":"string"},"langId":{"nullable":true,"type":"string"},"isBlocked":{"type":"boolean"},"developmentTag":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"},"originalAvatarFileUrl":{"nullable":true,"type":"string"},"enabledDevelopmentTags":{"type":"array","items":{"type":"object","properties":{"featureId":{"type":"string"},"tag":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"isEnabled":{"type":"number"}},"required":["featureId","tag","name","description","isEnabled"],"additionalProperties":false}},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","firstName","lastName","email","primaryCompanyId","primaryRole","role","langId","isBlocked","developmentTag","avatarFileUrl","originalAvatarFileUrl","enabledDevelopmentTags","updatedAt"],"additionalProperties":{}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/admin/users":{"post":{"summary":"Create a user with any role (admin only)","tags":["Administration/Users"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"nullable":true,"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"companyId":{"nullable":true,"type":"string","minLength":1},"role":{"type":"string","minLength":1},"firstName":{"type":"string","minLength":1,"maxLength":255,"pattern":"^\\S.*"},"lastName":{"nullable":true,"type":"string"}},"required":["role","firstName"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"nullable":true,"type":"string"},"lastName":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"primaryCompanyId":{"nullable":true,"type":"string"},"primaryRole":{"nullable":true,"type":"string"},"langId":{"nullable":true,"type":"string"},"isBlocked":{"nullable":true,"type":"boolean"},"developmentTag":{"nullable":true,"type":"string"},"intercomHash":{"nullable":true,"type":"string"},"emailSha256":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"},"originalAvatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","firstName","lastName","email","primaryCompanyId","primaryRole","langId","isBlocked","developmentTag","intercomHash","emailSha256","avatarFileUrl","originalAvatarFileUrl"],"additionalProperties":{}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/agent/run":{"post":{"tags":["Agent"],"description":"Stream agent responses via Mastra","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","additionalProperties":{}}}]}},"required":["role","content"]}},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"input_schema":{"type":"object","additionalProperties":{}}},"required":["name","input_schema"]}},"system":{"type":"string"},"model":{"type":"string"},"max_tokens":{"type":"number"}},"required":["messages"]}}}},"responses":{"200":{"description":"Default Response"}}}},"/api/agent/map-columns":{"post":{"tags":["Agent"],"description":"Suggest importer column mappings for headers that could not be matched deterministically","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"headers":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"samples":{"maxItems":10,"type":"array","items":{"type":"string"}}},"required":["name"]}},"candidates":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","maxLength":100},"label":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":500},"required":{"type":"boolean"},"aliases":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":200}},"exampleValues":{"maxItems":10,"type":"array","items":{"type":"string"}}},"required":["key","label"]}}},"required":["headers","candidates"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"matches":{"type":"array","items":{"type":"object","properties":{"header":{"type":"string"},"fieldKey":{"type":"string"},"confidence":{"type":"number","minimum":0,"maximum":1},"reason":{"type":"string"}},"required":["header","fieldKey","confidence"],"additionalProperties":false}}},"required":["matches"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/ai-extraction-feedback":{"post":{"tags":["AI Extraction Feedback"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string","minLength":1},"message":{"type":"string"},"entityType":{"type":"string","minLength":1},"entityId":{"type":"string","minLength":1}},"required":["result","entityType","entityId"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"message":{"type":"string"},"feedbackId":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"}},"required":["message","feedbackId","entityType","entityId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/ai-feedback":{"post":{"tags":["AI Feedback"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileId":{"type":"string","minLength":1},"assetId":{"type":"string","minLength":1},"assetType":{"type":"string","enum":["AUDIT","TRACING","CERTIFICATE","CERTIFIED_MATERIALS","CAP"]},"aiProcessType":{"type":"string","enum":["EXTRACTION","CLASSIFICATION","FIELD_EXTRACTION","CERTIFICATE_WORKFLOW"]},"vote":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"text":{"type":"string"}},"required":["fileId","assetId","assetType","aiProcessType"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"message":{"type":"string"},"feedbackId":{"type":"string"}},"required":["message","feedbackId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/ai-processing-status/stats":{"get":{"tags":["AI Processing"],"description":"Get AI processing status counts and percentage for the current company","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"processing":{"type":"number"},"completed":{"type":"number"},"failed":{"type":"number"},"total":{"type":"number"},"percentage":{"type":"number"}},"required":["processing","completed","failed","total","percentage"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/ai-processing-status/summary":{"get":{"tags":["AI Processing Status"],"description":"Get AI processing status summary and item list for the current company","parameters":[{"schema":{"type":"string","enum":["COMPLETED","PROCESSING","FAILED"]},"in":"query","name":"sortByStatus","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"stats":{"type":"object","properties":{"processing":{"type":"number"},"completed":{"type":"number"},"failed":{"type":"number"},"total":{"type":"number"},"percentage":{"type":"number"}},"required":["processing","completed","failed","total","percentage"],"additionalProperties":false},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"assetId":{"type":"string"},"assetType":{"type":"string"},"assetName":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["PROCESSING","COMPLETED","FAILED"]},"percentage":{"nullable":true,"type":"number"},"startedAt":{"type":"string","format":"date-time"},"completedAt":{"nullable":true,"type":"string","format":"date-time"},"metadata":{"nullable":true,"type":"object","additionalProperties":{}},"steps":{"nullable":true,"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"status":{"type":"string","enum":["PENDING","PROCESSING","COMPLETED","FAILED"]},"percent":{"type":"number"},"messageKey":{"nullable":true,"type":"string"},"reviewedAt":{"nullable":true,"type":"string"}},"required":["key","status","percent","messageKey"],"additionalProperties":false}}},"required":["id","assetId","assetType","assetName","status","percentage","startedAt","completedAt","metadata"],"additionalProperties":false}}},"required":["stats","items"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/ai-processing-status/{id}/dismiss":{"patch":{"tags":["AI Processing"],"description":"Dismiss an AI processing status record","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/ai-processing-status/asset/{assetId}/dismiss":{"patch":{"tags":["AI Processing"],"description":"Dismiss an AI processing status record by asset ID","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"assetId","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/assets/{assetId}/access-control":{"get":{"summary":"Get the access-control record for an asset","tags":["Assets"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"assetId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"assetId":{"type":"string"},"assetType":{"type":"string"},"ownedByCompanyId":{"type":"string"},"sharedWithCompanyId":{"type":"string"},"sharedByCompanyId":{"type":"string"},"rights":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"sharedByCompanyProfile":{"nullable":true,"type":"object","properties":{"forCompanyId":{"type":"string"},"byCompanyId":{"type":"string"},"displayName":{"nullable":true,"type":"string"}},"required":["forCompanyId","byCompanyId","displayName"],"additionalProperties":false},"ownedByCompanyProfile":{"nullable":true,"type":"object","properties":{"forCompanyId":{"type":"string"},"byCompanyId":{"type":"string"},"displayName":{"nullable":true,"type":"string"}},"required":["forCompanyId","byCompanyId","displayName"],"additionalProperties":false},"sharedWith":{"type":"array","items":{"type":"object","properties":{"sharedWithCompanyId":{"type":"string"},"assetId":{"type":"string"},"assetType":{"type":"string"},"rights":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"companyProfile":{"nullable":true,"type":"object","properties":{"forCompanyId":{"type":"string"},"byCompanyId":{"type":"string"},"displayName":{"nullable":true,"type":"string"}},"required":["forCompanyId","byCompanyId","displayName"],"additionalProperties":false}},"required":["sharedWithCompanyId","assetId","assetType","rights","status","createdAt","updatedAt","companyProfile"],"additionalProperties":false}}},"required":["assetId","assetType","ownedByCompanyId","sharedWithCompanyId","sharedByCompanyId","rights","status","createdAt","updatedAt","sharedByCompanyProfile","ownedByCompanyProfile","sharedWith"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/assets/{assetId}/shares":{"post":{"summary":"Share an asset with another company","tags":["Companies","Assets"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1,"maxLength":64}},"required":["companyId"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"assetId","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/audits/":{"post":{"tags":["Audits"],"description":"Create an audit","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1},"auditTypeId":{"type":"string","minLength":1},"auditDate":{"nullable":true,"type":"string"},"auditedBy":{"nullable":true,"type":"string"},"facilityScore":{"nullable":true,"type":"string"},"isPublic":{"type":"boolean"},"nextPlannedAuditDate":{"nullable":true,"type":"string"},"referenceNumber":{"nullable":true,"type":"string"},"shareWithCompanyId":{"nullable":true,"type":"string"},"auditReportFile":{"nullable":true,"type":"object","properties":{"id":{"type":"string","minLength":1},"url":{"type":"string","minLength":1},"bucketName":{"type":"string","minLength":1},"name":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileHash":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"fileType":{"nullable":true,"type":"string"}},"required":["id","url","bucketName"],"additionalProperties":{}},"correctiveActionPlanFile":{"nullable":true,"type":"object","properties":{"id":{"type":"string","minLength":1},"url":{"type":"string","minLength":1},"bucketName":{"type":"string","minLength":1},"name":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileHash":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"fileType":{"nullable":true,"type":"string"}},"required":["id","url","bucketName"],"additionalProperties":{}},"auditReportFileId":{"nullable":true,"type":"string"},"correctiveActionPlanFileId":{"nullable":true,"type":"string"},"extractFile":{"nullable":true,"type":"boolean"},"workflowId":{"nullable":true,"type":"string","minLength":1},"generatedBy":{"nullable":true,"type":"string","enum":["USER_GENERATED","AI_GENERATED"]}},"required":["companyId"],"additionalProperties":{}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"nullable":true,"type":"string"},"uploaderCompanyId":{"nullable":true,"type":"string"},"auditTypeId":{"nullable":true,"type":"string"},"auditTypeName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"referenceNumber":{"nullable":true,"type":"string"},"facilityScore":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/audits/{id}":{"get":{"tags":["Audits"],"description":"Fetch a single audit by id, scoped to the companies the caller has been granted access to.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"nullable":true,"type":"string"},"companyName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"auditTypeId":{"nullable":true,"type":"string"},"auditTypeName":{"nullable":true,"type":"string"},"referenceNumber":{"nullable":true,"type":"string"},"facilityScore":{"nullable":true,"type":"string"},"rights":{"type":"array","items":{"type":"string"}},"privacyStatus":{"nullable":true,"type":"object","properties":{"status":{"type":"string"}},"required":["status"],"additionalProperties":false}},"required":["id","rights","privacyStatus"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/audits/digitization/":{"post":{"tags":["Audits"],"description":"Start the digitization process for an audit","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"auditId":{"type":"string","minLength":1}},"required":["auditId"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"auditId":{"type":"string"},"status":{"nullable":true,"type":"string"},"workflows":{"nullable":true,"type":"object","additionalProperties":{}},"finishedWorkflows":{"nullable":true,"type":"object","additionalProperties":{}},"percentage":{"nullable":true,"type":"number"},"auditSummary":{"nullable":true,"type":"string"},"extractedSections":{"nullable":true,"type":"object","additionalProperties":{}},"extractedDatapoints":{"nullable":true,"type":"object","additionalProperties":{}},"metadata":{"nullable":true,"type":"object","additionalProperties":{}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","auditId","status","workflows","finishedWorkflows","percentage","auditSummary","extractedSections","extractedDatapoints","metadata","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/audits/digitization/{auditId}":{"get":{"tags":["Audits"],"description":"Get digitization record for an audit","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"auditId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"auditId":{"type":"string"},"status":{"nullable":true,"type":"string"},"workflows":{"nullable":true,"type":"object","additionalProperties":{}},"finishedWorkflows":{"nullable":true,"type":"object","additionalProperties":{}},"percentage":{"nullable":true,"type":"number"},"auditSummary":{"nullable":true,"type":"string"},"extractedSections":{"nullable":true,"type":"object","additionalProperties":{}},"extractedDatapoints":{"nullable":true,"type":"object","additionalProperties":{}},"metadata":{"nullable":true,"type":"object","additionalProperties":{}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","auditId","status","workflows","finishedWorkflows","percentage","auditSummary","extractedSections","extractedDatapoints","metadata","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/audits/digitization/{auditId}/history/":{"post":{"tags":["Audits"],"description":"Record a datapoints sync history entry for a digitized audit","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"byCompanyId":{"type":"string"},"forCompanyId":{"type":"string"},"onBehalfOfCompanyId":{"type":"string"},"failedDatapoints":{"type":"array","items":{}}},"required":["byCompanyId","forCompanyId","onBehalfOfCompanyId","failedDatapoints"]}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"auditId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"sourceType":{"type":"string"},"sourceId":{"type":"string"},"byCompanyId":{"type":"string"},"forCompanyId":{"type":"string"},"onBehalfOfCompanyId":{"type":"string"},"failedDatapoints":{"nullable":true,"type":"array","items":{}},"createdAt":{"type":"string","format":"date-time"}},"required":["id","sourceType","sourceId","byCompanyId","forCompanyId","onBehalfOfCompanyId","failedDatapoints","createdAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/authentication/login":{"post":{"tags":["Authentication"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"code":{"type":"string","minLength":6,"maxLength":6},"flowId":{"type":"string"}},"required":["email","code","flowId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"me":{},"sessionToken":{"type":"string"}},"required":["accessToken","refreshToken","me","sessionToken"],"additionalProperties":false}}}}}}},"/api/authentication/logout":{"post":{"tags":["Authentication"],"description":"Invalidates the given refresh token.","responses":{"200":{"description":"Default Response"}}}},"/api/authentication/refresh-token":{"post":{"tags":["Authentication"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"accessToken":{"type":"string"},"user":{}},"required":["accessToken","user"],"additionalProperties":false}}}}}}},"/api/authentication/request-code":{"post":{"tags":["Authentication"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["email"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"flowId":{"type":"string"}},"required":["flowId"],"additionalProperties":false}}}}}}},"/api/authentication/single-sign-on/{domain}":{"get":{"tags":["Authentication"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"login_hint","required":false},{"schema":{"type":"string","minLength":1},"in":"path","name":"domain","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"authorizationUrl":{"type":"string"}},"required":["authorizationUrl"],"additionalProperties":false}}}}}}},"/api/authentication/oauth2/callback":{"get":{"tags":["Authentication"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"code","required":true},{"schema":{"type":"string","minLength":1},"in":"query","name":"state","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/api/authentication/sso-code":{"get":{"tags":["Authentication"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"code","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"me":{},"sessionToken":{"type":"string"}},"required":["accessToken","refreshToken","me","sessionToken"],"additionalProperties":false}}}}}}},"/api/authentication/sso-status":{"get":{"tags":["Authentication"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"domain","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ssoRequired":{"type":"boolean"}},"required":["ssoRequired"],"additionalProperties":false}}}}}}},"/api/system/queue-jobs/list":{"post":{"tags":["System/QueueJobs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"scheduled_at","type":"string","enum":["scheduled_at","priority"]},"ids":{"default":[],"type":"array","items":{"type":"string"}},"status":{"type":"string"},"processor_namespace":{"type":"string"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"processorNamespace":{"type":"string"},"status":{"type":"string"},"priority":{"type":"number"},"scheduledAt":{"type":"number"},"processedAt":{"nullable":true,"type":"number"},"processingStartedAt":{"nullable":true,"type":"number"},"attempts":{"type":"number"},"maxAttempts":{"type":"number"},"error":{"nullable":true,"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","jobId","processorNamespace","status","priority","scheduledAt","attempts","maxAttempts","createdAt"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/system/queue-jobs/run":{"post":{"tags":["System/QueueJobs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"executed":{"type":"boolean"}},"required":["executed"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/system/queue-jobs/{id}":{"get":{"tags":["System/QueueJobs"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"processorNamespace":{"type":"string"},"status":{"type":"string"},"priority":{"type":"number"},"scheduledAt":{"type":"number"},"processedAt":{"nullable":true,"type":"number"},"processingStartedAt":{"nullable":true,"type":"number"},"attempts":{"type":"number"},"maxAttempts":{"type":"number"},"error":{"nullable":true,"type":"string"},"createdAt":{"type":"string","format":"date-time"},"job":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"payload":{"type":"string"},"headers":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","payload","headers","createdAt"],"additionalProperties":false}},"required":["id","jobId","processorNamespace","status","priority","scheduledAt","processedAt","processingStartedAt","attempts","maxAttempts","error","createdAt","job"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/system/files//":{"post":{"tags":["System/Files"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","minLength":1},"fileSize":{"type":"number","minimum":1,"maximum":1073741824},"fileType":{"type":"string","enum":["image/jpeg","image/png","image/gif","image/webp","image/bmp","image/tiff","image/heic","video/mp4","video/webm","video/quicktime","video/x-msvideo","video/x-matroska","application/pdf","text/rtf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation"]}},"required":["filename","fileSize","fileType"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string","minLength":1},"bucketName":{"type":"string","enum":["public","private","incoming"]},"url":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"fileType":{"nullable":true,"type":"string","enum":["IMAGE","VIDEO","DOCUMENT"]},"documentText":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string","enum":["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/octet-stream","application/pdf","text/rtf","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/kswps","application/zip","binary/octet-stream","IMAGE","image/bmp","image/gif","image/heic","image/jpeg","image/png","image/svg+xml","image/tiff","image/webp","text/csv","video/mp4","video/webm","video/quicktime","video/x-msvideo","video/x-matroska"]},"contentMd5Hash":{"nullable":true,"type":"string"},"fileHash":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"isMigrated":{"nullable":true,"type":"integer","minimum":0,"maximum":1},"isPrivate":{"nullable":true,"type":"integer","minimum":0,"maximum":1},"uploadUrl":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"},"previewUrl":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdBy":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByImpersonateName":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"normalizeAttemptedAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","bucketName","url","name","fileType","contentType","fileHash","fileSize","isMigrated","isPrivate","createdAt","createdBy","createdByCompanyId","createdByApiKeyId","createdByApiKeyLabel","createdByImpersonateId","createdByImpersonateName","createdByUserId","updatedAt","updatedByApiKeyId","updatedByApiKeyLabel","updatedByCompanyId","updatedByCompanyName","updatedByImpersonateId","updatedByImpersonateName","updatedByUserId","updatedByUserName"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/system/emails/{id}":{"get":{"tags":["System/Emails"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"subject":{"nullable":true,"type":"string"},"environment":{"type":"string"},"lastStatus":{"type":"string"},"statuses":{"default":[],"type":"array","items":{"type":"object","properties":{"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["status","createdAt"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"}},"required":["id","email","environment","lastStatus","statuses","createdAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/system/emails/bounce":{"post":{"tags":["System/Emails"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"processed":{"type":"boolean"}},"required":["processed"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/system/emails/list":{"post":{"tags":["System/Emails"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"created_at","type":"string","enum":["created_at"]},"ids":{"default":[],"type":"array","items":{"type":"string"}},"status":{"type":"string"},"email":{"type":"string"}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"subject":{"nullable":true,"type":"string"},"environment":{"type":"string"},"lastStatus":{"type":"string"},"statuses":{"default":[],"type":"array","items":{"type":"object","properties":{"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["status","createdAt"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"}},"required":["id","email","environment","lastStatus","statuses","createdAt"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/system/cache/health":{"get":{"tags":["System/Cache"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"ok":{"type":"boolean"},"pingMs":{"type":"number"},"roundTripMs":{"type":"number"},"prefix":{"type":"string"}},"required":["ok","pingMs","roundTripMs","prefix"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/capa/actions/":{"get":{"tags":["CAPA Actions"],"description":"List corrective actions (CA) and preventive actions (PA)","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"count","required":false},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false,"description":"JSON string with filter criteria for corrective and preventive actions"},{"schema":{"default":"all","type":"string","enum":["all","internal","external","assignedToMe","reportedByMe"]},"in":"query","name":"quickFilter","required":false,"description":"Quick filter options: 'all' for all accessible actions, 'internal' for actions owned by your company, 'external' for actions owned by other companies, 'assignedToMe' for actions assigned to you, 'reportedByMe' for actions where you are the reporter"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"sourceType":{"nullable":true,"type":"string"},"sourceId":{"nullable":true,"type":"string"},"priority":{"nullable":true,"type":"string","enum":["A","B","C","D","E"]},"status":{"nullable":true,"type":"string","enum":["TO_DO","IN_PROGRESS","BLOCKED","IN_REVIEW","CHANGES_REQUESTED","DONE"]},"dueDate":{"nullable":true,"type":"string","format":"date-time"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"auditor":{"nullable":true,"type":"string"},"finding":{"nullable":true,"type":"string"},"goals":{"nullable":true,"type":"string"},"requirement":{"nullable":true,"type":"string"},"managementResponse":{"nullable":true,"type":"string"},"recommendation":{"nullable":true,"type":"string"},"rootCause":{"nullable":true,"type":"string"},"isArchived":{"type":"number"},"startedAt":{"nullable":true,"type":"string","format":"date-time"},"endedAt":{"nullable":true,"type":"string","format":"date-time"},"attachments":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"nullable":true,"type":"string"},"bucketName":{"type":"string"},"isPrivate":{"nullable":true,"type":"number"},"name":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","url","bucketName","isPrivate","name","contentType","fileSize","createdAt","createdByUserId"],"additionalProperties":false}},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"auditFindingId":{"nullable":true,"type":"string"},"assignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"reporters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"ownerCompanyId":{"nullable":true,"type":"string"},"ownerCompanyName":{"nullable":true,"type":"string"},"internalCompanyCode":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"generatedBy":{"nullable":true,"type":"string"},"owner":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"}},"required":["id","name","facilityProcesses","country","countryName"],"additionalProperties":false},"source":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"auditTypeId":{"nullable":true,"type":"string"},"auditTypeName":{"nullable":true,"type":"string"},"referenceNumber":{"nullable":true,"type":"string"},"auditDate":{"nullable":true,"type":"string","format":"date-time"},"facilityScore":{"nullable":true,"type":"string"}},"required":["id","name","auditTypeId","auditTypeName","referenceNumber","auditDate","facilityScore"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"objectId":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"revision":{"type":"string"},"submittedOn":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","objectId","version","status","revision","submittedOn"],"additionalProperties":false},{"type":"object","properties":{},"additionalProperties":false}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}},"cap":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"nullable":true,"type":"string"},"priority":{"nullable":true,"type":"string","enum":["A","B","C","D","E"]},"dueDate":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","title","status","priority","dueDate"],"additionalProperties":false},"watchers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"users":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"type":{"type":"string"},"companyId":{"nullable":true,"type":"string"}},"required":["userId","type","companyId"],"additionalProperties":false}},"companies":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"type":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"}},"required":["companyId","type","name","officialName","country","countryName","facilityProcesses"],"additionalProperties":false}},"remediationRequest":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"status":{"type":"string"},"message":{"type":"string"},"attachmentFileIds":{"type":"array","items":{"type":"string"}},"requestedChangeMessage":{"nullable":true,"type":"string"},"requestedChangeDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"requestedChangeUserId":{"nullable":true,"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"nullable":true,"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"nullable":true,"type":"string"},"bucketName":{"type":"string"},"isPrivate":{"nullable":true,"type":"number"},"name":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","url","bucketName","isPrivate","name","contentType","fileSize","createdAt"],"additionalProperties":false}}},"required":["id","actionId","status","message","attachmentFileIds","createdAt","createdByUserId","createdByCompanyId","updatedAt","files"],"additionalProperties":false},"linkedActions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"nullable":true,"type":"string"},"status":{"type":"string"},"description":{"nullable":true,"type":"string"},"sourceType":{"nullable":true,"type":"string"},"sourceId":{"nullable":true,"type":"string"},"ownerCompanyId":{"nullable":true,"type":"string"},"ownerCompanyName":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","title","type","status","description","sourceType","sourceId","ownerCompanyId","ownerCompanyName","createdAt"],"additionalProperties":false}}},"required":["id","title","description","type","impactAreaId","sourceType","sourceId","priority","status","dueDate","createdAt","updatedAt","auditor","finding","goals","requirement","managementResponse","recommendation","rootCause","isArchived","startedAt","endedAt","attachments","createdByUserId","createdByCompanyId","auditFindingId","assignees","reporters","ownerCompanyId","ownerCompanyName","watchers"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","pageSize","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/api/capa/actions/{id}":{"get":{"tags":["CAPA Actions"],"description":"Get action details by ID","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"sourceType":{"nullable":true,"type":"string"},"sourceId":{"nullable":true,"type":"string"},"priority":{"nullable":true,"type":"string","enum":["A","B","C","D","E"]},"status":{"nullable":true,"type":"string","enum":["TO_DO","IN_PROGRESS","BLOCKED","IN_REVIEW","CHANGES_REQUESTED","DONE"]},"dueDate":{"nullable":true,"type":"string","format":"date-time"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"auditor":{"nullable":true,"type":"string"},"finding":{"nullable":true,"type":"string"},"goals":{"nullable":true,"type":"string"},"requirement":{"nullable":true,"type":"string"},"managementResponse":{"nullable":true,"type":"string"},"recommendation":{"nullable":true,"type":"string"},"rootCause":{"nullable":true,"type":"string"},"isArchived":{"type":"number"},"startedAt":{"nullable":true,"type":"string","format":"date-time"},"endedAt":{"nullable":true,"type":"string","format":"date-time"},"attachments":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"nullable":true,"type":"string"},"bucketName":{"type":"string"},"isPrivate":{"nullable":true,"type":"number"},"name":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","url","bucketName","isPrivate","name","contentType","fileSize","createdAt","createdByUserId"],"additionalProperties":false}},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"auditFindingId":{"nullable":true,"type":"string"},"assignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"reporters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"ownerCompanyId":{"nullable":true,"type":"string"},"ownerCompanyName":{"nullable":true,"type":"string"},"internalCompanyCode":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"generatedBy":{"nullable":true,"type":"string"},"owner":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"}},"required":["id","name","facilityProcesses","country","countryName"],"additionalProperties":false},"source":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"auditTypeId":{"nullable":true,"type":"string"},"auditTypeName":{"nullable":true,"type":"string"},"referenceNumber":{"nullable":true,"type":"string"},"auditDate":{"nullable":true,"type":"string","format":"date-time"},"facilityScore":{"nullable":true,"type":"string"}},"required":["id","name","auditTypeId","auditTypeName","referenceNumber","auditDate","facilityScore"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"objectId":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"revision":{"type":"string"},"submittedOn":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","objectId","version","status","revision","submittedOn"],"additionalProperties":false},{"type":"object","properties":{},"additionalProperties":false}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}},"cap":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"nullable":true,"type":"string"},"priority":{"nullable":true,"type":"string","enum":["A","B","C","D","E"]},"dueDate":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","title","status","priority","dueDate"],"additionalProperties":false},"watchers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"users":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"type":{"type":"string"},"companyId":{"nullable":true,"type":"string"}},"required":["userId","type","companyId"],"additionalProperties":false}},"companies":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"type":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"}},"required":["companyId","type","name","officialName","country","countryName","facilityProcesses"],"additionalProperties":false}},"remediationRequest":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"status":{"type":"string"},"message":{"type":"string"},"attachmentFileIds":{"type":"array","items":{"type":"string"}},"requestedChangeMessage":{"nullable":true,"type":"string"},"requestedChangeDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"requestedChangeUserId":{"nullable":true,"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"nullable":true,"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"nullable":true,"type":"string"},"bucketName":{"type":"string"},"isPrivate":{"nullable":true,"type":"number"},"name":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","url","bucketName","isPrivate","name","contentType","fileSize","createdAt"],"additionalProperties":false}}},"required":["id","actionId","status","message","attachmentFileIds","createdAt","createdByUserId","createdByCompanyId","updatedAt","files"],"additionalProperties":false},"linkedActions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"nullable":true,"type":"string"},"status":{"type":"string"},"description":{"nullable":true,"type":"string"},"sourceType":{"nullable":true,"type":"string"},"sourceId":{"nullable":true,"type":"string"},"ownerCompanyId":{"nullable":true,"type":"string"},"ownerCompanyName":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","title","type","status","description","sourceType","sourceId","ownerCompanyId","ownerCompanyName","createdAt"],"additionalProperties":false}},"userRoles":{"type":"array","items":{"type":"string"}},"companyRoles":{"type":"array","items":{"type":"string"}}},"required":["id","title","description","type","impactAreaId","sourceType","sourceId","priority","status","dueDate","createdAt","updatedAt","auditor","finding","goals","requirement","managementResponse","recommendation","rootCause","isArchived","startedAt","endedAt","attachments","createdByUserId","createdByCompanyId","auditFindingId","assignees","reporters","ownerCompanyId","ownerCompanyName","watchers","userRoles","companyRoles"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}},"patch":{"tags":["CAPA Actions"],"description":"Update a Corrective Action (CA) or Preventive Action (PA)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":512},"description":{"type":"string"},"type":{"type":"string","enum":["CA","PA"]},"impactAreaId":{"type":"string"},"sourceType":{"type":"string"},"sourceId":{"type":"string"},"priority":{"type":"string"},"status":{"type":"string","enum":["TO_DO","IN_PROGRESS","BLOCKED","IN_REVIEW","CHANGES_REQUESTED","DONE"]},"dueDate":{"anyOf":[{"type":"string"}]},"startedAt":{"anyOf":[{"type":"string"}]},"endedAt":{"anyOf":[{"type":"string"}]},"auditor":{"type":"string"},"finding":{"type":"string"},"goals":{"type":"string"},"requirement":{"type":"string"},"managementResponse":{"type":"string"},"recommendation":{"type":"string"},"rootCause":{"type":"string"},"capId":{"type":"string"},"reporters":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"companyId":{"type":"string"}},"required":["userId","companyId"]}},"assignees":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"companyId":{"type":"string"}},"required":["userId","companyId"]}},"collaboratorIds":{"type":"array","items":{"type":"string"}},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"bucketName":{"type":"string"}},"required":["id","name","contentType","fileSize","bucketName"]}}}}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"sourceType":{"nullable":true,"type":"string"},"sourceId":{"nullable":true,"type":"string"},"priority":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string","enum":["TO_DO","IN_PROGRESS","BLOCKED","IN_REVIEW","CHANGES_REQUESTED","DONE"]},"dueDate":{"nullable":true,"type":"string","format":"date-time"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"auditor":{"nullable":true,"type":"string"},"finding":{"nullable":true,"type":"string"},"goals":{"nullable":true,"type":"string"},"requirement":{"nullable":true,"type":"string"},"managementResponse":{"nullable":true,"type":"string"},"recommendation":{"nullable":true,"type":"string"},"rootCause":{"nullable":true,"type":"string"},"isArchived":{"type":"number"},"startedAt":{"nullable":true,"type":"string","format":"date-time"},"endedAt":{"nullable":true,"type":"string","format":"date-time"},"attachments":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"nullable":true,"type":"string"},"bucketName":{"type":"string"},"isPrivate":{"nullable":true,"type":"number"},"name":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","url","bucketName","isPrivate","name","contentType","fileSize","createdAt","createdByUserId"],"additionalProperties":false}},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"auditFindingId":{"nullable":true,"type":"string"},"assignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"reporters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"ownerCompanyId":{"nullable":true,"type":"string"},"ownerCompanyName":{"nullable":true,"type":"string"},"internalCompanyCode":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"generatedBy":{"nullable":true,"type":"string"},"owner":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"}},"required":["id","name","facilityProcesses","country","countryName"],"additionalProperties":false},"source":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"auditTypeId":{"nullable":true,"type":"string"},"auditTypeName":{"nullable":true,"type":"string"},"referenceNumber":{"nullable":true,"type":"string"},"auditDate":{"nullable":true,"type":"string","format":"date-time"},"facilityScore":{"nullable":true,"type":"string"}},"required":["id","name","auditTypeId","auditTypeName","referenceNumber","auditDate","facilityScore"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"objectId":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"revision":{"type":"string"},"submittedOn":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","objectId","version","status","revision","submittedOn"],"additionalProperties":false},{"type":"object","properties":{},"additionalProperties":false}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}},"cap":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"nullable":true,"type":"string"},"priority":{"nullable":true,"type":"string"},"dueDate":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","title","status","priority","dueDate"],"additionalProperties":false},"watchers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"users":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"type":{"type":"string"},"companyId":{"nullable":true,"type":"string"}},"required":["userId","type","companyId"],"additionalProperties":false}},"companies":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"type":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"}},"required":["companyId","type","name","officialName","country","countryName","facilityProcesses"],"additionalProperties":false}},"remediationRequest":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"status":{"type":"string"},"message":{"type":"string"},"attachmentFileIds":{"type":"array","items":{"type":"string"}},"requestedChangeMessage":{"nullable":true,"type":"string"},"requestedChangeDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"requestedChangeUserId":{"nullable":true,"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"nullable":true,"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"nullable":true,"type":"string"},"bucketName":{"type":"string"},"isPrivate":{"nullable":true,"type":"number"},"name":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","url","bucketName","isPrivate","name","contentType","fileSize","createdAt"],"additionalProperties":false}}},"required":["id","actionId","status","message","attachmentFileIds","createdAt","createdByUserId","createdByCompanyId","updatedAt","files"],"additionalProperties":false},"linkedActions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"description":{"nullable":true,"type":"string"},"sourceType":{"nullable":true,"type":"string"},"sourceId":{"nullable":true,"type":"string"},"ownerCompanyId":{"nullable":true,"type":"string"},"ownerCompanyName":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","title","status","description","sourceType","sourceId","ownerCompanyId","ownerCompanyName","createdAt"],"additionalProperties":false}}},"required":["id","title","description","type","impactAreaId","sourceType","sourceId","priority","status","dueDate","createdAt","updatedAt","auditor","finding","goals","requirement","managementResponse","recommendation","rootCause","isArchived","startedAt","endedAt","attachments","createdByUserId","createdByCompanyId","auditFindingId","assignees","reporters","ownerCompanyId","ownerCompanyName","watchers"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/capa/actions/archive":{"get":{"tags":["CAPA Actions"],"description":"List archived corrective actions (CA) and preventive actions (PA)","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"count","required":false},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false,"description":"JSON string with filter criteria for corrective and preventive actions"},{"schema":{"default":"all","type":"string","enum":["all","internal","external","assignedToMe","reportedByMe"]},"in":"query","name":"quickFilter","required":false,"description":"Quick filter options: 'all' for all accessible actions, 'internal' for actions owned by your company, 'external' for actions owned by other companies, 'assignedToMe' for actions assigned to you, 'reportedByMe' for actions where you are the reporter"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"sourceType":{"nullable":true,"type":"string"},"sourceId":{"nullable":true,"type":"string"},"priority":{"nullable":true,"type":"string","enum":["A","B","C","D","E"]},"status":{"nullable":true,"type":"string","enum":["TO_DO","IN_PROGRESS","BLOCKED","IN_REVIEW","CHANGES_REQUESTED","DONE"]},"dueDate":{"nullable":true,"type":"string","format":"date-time"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"auditor":{"nullable":true,"type":"string"},"finding":{"nullable":true,"type":"string"},"goals":{"nullable":true,"type":"string"},"requirement":{"nullable":true,"type":"string"},"managementResponse":{"nullable":true,"type":"string"},"recommendation":{"nullable":true,"type":"string"},"rootCause":{"nullable":true,"type":"string"},"isArchived":{"type":"number"},"startedAt":{"nullable":true,"type":"string","format":"date-time"},"endedAt":{"nullable":true,"type":"string","format":"date-time"},"attachments":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"nullable":true,"type":"string"},"bucketName":{"type":"string"},"isPrivate":{"nullable":true,"type":"number"},"name":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","url","bucketName","isPrivate","name","contentType","fileSize","createdAt","createdByUserId"],"additionalProperties":false}},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"auditFindingId":{"nullable":true,"type":"string"},"assignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"reporters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"ownerCompanyId":{"nullable":true,"type":"string"},"ownerCompanyName":{"nullable":true,"type":"string"},"internalCompanyCode":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"generatedBy":{"nullable":true,"type":"string"},"owner":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"}},"required":["id","name","facilityProcesses","country","countryName"],"additionalProperties":false},"source":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"auditTypeId":{"nullable":true,"type":"string"},"auditTypeName":{"nullable":true,"type":"string"},"referenceNumber":{"nullable":true,"type":"string"},"auditDate":{"nullable":true,"type":"string","format":"date-time"},"facilityScore":{"nullable":true,"type":"string"}},"required":["id","name","auditTypeId","auditTypeName","referenceNumber","auditDate","facilityScore"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"objectId":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"revision":{"type":"string"},"submittedOn":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","objectId","version","status","revision","submittedOn"],"additionalProperties":false},{"type":"object","properties":{},"additionalProperties":false}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}},"cap":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"nullable":true,"type":"string"},"priority":{"nullable":true,"type":"string","enum":["A","B","C","D","E"]},"dueDate":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","title","status","priority","dueDate"],"additionalProperties":false},"watchers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"users":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"type":{"type":"string"},"companyId":{"nullable":true,"type":"string"}},"required":["userId","type","companyId"],"additionalProperties":false}},"companies":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"type":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"}},"required":["companyId","type","name","officialName","country","countryName","facilityProcesses"],"additionalProperties":false}},"remediationRequest":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"status":{"type":"string"},"message":{"type":"string"},"attachmentFileIds":{"type":"array","items":{"type":"string"}},"requestedChangeMessage":{"nullable":true,"type":"string"},"requestedChangeDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"requestedChangeUserId":{"nullable":true,"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"nullable":true,"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"nullable":true,"type":"string"},"bucketName":{"type":"string"},"isPrivate":{"nullable":true,"type":"number"},"name":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","url","bucketName","isPrivate","name","contentType","fileSize","createdAt"],"additionalProperties":false}}},"required":["id","actionId","status","message","attachmentFileIds","createdAt","createdByUserId","createdByCompanyId","updatedAt","files"],"additionalProperties":false},"linkedActions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"nullable":true,"type":"string"},"status":{"type":"string"},"description":{"nullable":true,"type":"string"},"sourceType":{"nullable":true,"type":"string"},"sourceId":{"nullable":true,"type":"string"},"ownerCompanyId":{"nullable":true,"type":"string"},"ownerCompanyName":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","title","type","status","description","sourceType","sourceId","ownerCompanyId","ownerCompanyName","createdAt"],"additionalProperties":false}}},"required":["id","title","description","type","impactAreaId","sourceType","sourceId","priority","status","dueDate","createdAt","updatedAt","auditor","finding","goals","requirement","managementResponse","recommendation","rootCause","isArchived","startedAt","endedAt","attachments","createdByUserId","createdByCompanyId","auditFindingId","assignees","reporters","ownerCompanyId","ownerCompanyName","watchers"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","pageSize","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/api/capa/actions/filter-sources":{"get":{"tags":["CAPA Actions"],"description":"List the deduplicated Source filter options for the actions list: distinct audit types of source audits plus an SLCP pseudo-type when SLCP sources exist","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"}},"required":["key","name"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/capa/actions/create-from-cap":{"post":{"tags":["CAPA Actions"],"description":"Create a new Corrective/Preventive Action from a Corrective Action Plan (CAP)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"capId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"auditFindingId":{"nullable":true,"type":"string"},"type":{"type":"string","enum":["CA","PA"]},"reporters":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1}},"required":["userId","companyId"]}}},"required":["capId","title","auditFindingId","type"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"sourceType":{"nullable":true,"type":"string"},"sourceId":{"nullable":true,"type":"string"},"priority":{"nullable":true,"type":"string","enum":["A","B","C","D","E"]},"status":{"nullable":true,"type":"string","enum":["TO_DO","IN_PROGRESS","BLOCKED","IN_REVIEW","CHANGES_REQUESTED","DONE"]},"dueDate":{"nullable":true,"type":"string","format":"date-time"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"auditor":{"nullable":true,"type":"string"},"finding":{"nullable":true,"type":"string"},"goals":{"nullable":true,"type":"string"},"requirement":{"nullable":true,"type":"string"},"managementResponse":{"nullable":true,"type":"string"},"recommendation":{"nullable":true,"type":"string"},"rootCause":{"nullable":true,"type":"string"},"isArchived":{"type":"number"},"startedAt":{"nullable":true,"type":"string","format":"date-time"},"endedAt":{"nullable":true,"type":"string","format":"date-time"},"attachments":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"nullable":true,"type":"string"},"bucketName":{"type":"string"},"isPrivate":{"nullable":true,"type":"number"},"name":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","url","bucketName","isPrivate","name","contentType","fileSize","createdAt","createdByUserId"],"additionalProperties":false}},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"auditFindingId":{"nullable":true,"type":"string"},"assignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"reporters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"ownerCompanyId":{"nullable":true,"type":"string"},"ownerCompanyName":{"nullable":true,"type":"string"},"internalCompanyCode":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"generatedBy":{"nullable":true,"type":"string"},"owner":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"}},"required":["id","name","facilityProcesses","country","countryName"],"additionalProperties":false},"source":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"auditTypeId":{"nullable":true,"type":"string"},"auditTypeName":{"nullable":true,"type":"string"},"referenceNumber":{"nullable":true,"type":"string"},"auditDate":{"nullable":true,"type":"string","format":"date-time"},"facilityScore":{"nullable":true,"type":"string"}},"required":["id","name","auditTypeId","auditTypeName","referenceNumber","auditDate","facilityScore"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"objectId":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"revision":{"type":"string"},"submittedOn":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","objectId","version","status","revision","submittedOn"],"additionalProperties":false},{"type":"object","properties":{},"additionalProperties":false}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}},"cap":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"nullable":true,"type":"string"},"priority":{"nullable":true,"type":"string","enum":["A","B","C","D","E"]},"dueDate":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","title","status","priority","dueDate"],"additionalProperties":false},"watchers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"users":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"type":{"type":"string"},"companyId":{"nullable":true,"type":"string"}},"required":["userId","type","companyId"],"additionalProperties":false}},"companies":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"type":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"}},"required":["companyId","type","name","officialName","country","countryName","facilityProcesses"],"additionalProperties":false}},"remediationRequest":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"status":{"type":"string"},"message":{"type":"string"},"attachmentFileIds":{"type":"array","items":{"type":"string"}},"requestedChangeMessage":{"nullable":true,"type":"string"},"requestedChangeDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"requestedChangeUserId":{"nullable":true,"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"nullable":true,"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"nullable":true,"type":"string"},"bucketName":{"type":"string"},"isPrivate":{"nullable":true,"type":"number"},"name":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","url","bucketName","isPrivate","name","contentType","fileSize","createdAt"],"additionalProperties":false}}},"required":["id","actionId","status","message","attachmentFileIds","createdAt","createdByUserId","createdByCompanyId","updatedAt","files"],"additionalProperties":false},"linkedActions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"nullable":true,"type":"string"},"status":{"type":"string"},"description":{"nullable":true,"type":"string"},"sourceType":{"nullable":true,"type":"string"},"sourceId":{"nullable":true,"type":"string"},"ownerCompanyId":{"nullable":true,"type":"string"},"ownerCompanyName":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","title","type","status","description","sourceType","sourceId","ownerCompanyId","ownerCompanyName","createdAt"],"additionalProperties":false}}},"required":["id","title","description","type","impactAreaId","sourceType","sourceId","priority","status","dueDate","createdAt","updatedAt","auditor","finding","goals","requirement","managementResponse","recommendation","rootCause","isArchived","startedAt","endedAt","attachments","createdByUserId","createdByCompanyId","auditFindingId","assignees","reporters","ownerCompanyId","ownerCompanyName","watchers"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/capa/actions/bulk-link-cap":{"patch":{"tags":["CAPA Actions"],"description":"Bulk link multiple Corrective Actions (CA) or Preventive Actions (PA) to a CAP","requestBody":{"required":true,"content":{"application/json":{"schema":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"capId":{"type":"string","minLength":1}},"required":["id","capId"]}}}}},"parameters":[{"schema":{},"in":"query","name":"updateLinkedActions","required":false}],"responses":{}}},"/api/capa/actions/bulk-assignee":{"patch":{"tags":["CAPA Actions"],"description":"Bulk add or remove assignees across multiple Corrective Actions (CA) or Preventive Actions (PA)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actionIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"add":{"default":[],"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1}},"required":["userId","companyId"]}},"remove":{"default":[],"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1}},"required":["userId","companyId"]}}},"required":["actionIds"]}}}},"responses":{}}},"/api/capa/actions/bulk-collaborator":{"patch":{"tags":["CAPA Actions"],"description":"Bulk add or remove collaborator companies across multiple Corrective Actions (CA) or Preventive Actions (PA)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actionIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"add":{"default":[],"type":"array","items":{"type":"string","minLength":1}},"remove":{"default":[],"type":"array","items":{"type":"string","minLength":1}}},"required":["actionIds"]}}}},"responses":{}}},"/api/capa/actions/bulk-impact-area":{"patch":{"tags":["CAPA Actions"],"description":"Bulk update Impact Area for multiple Corrective Actions (CA) or Preventive Actions (PA)","requestBody":{"required":true,"content":{"application/json":{"schema":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"impactAreaId":{"type":"string","minLength":1}},"required":["id","impactAreaId"]}}}}},"responses":{}}},"/api/capa/actions/bulk-reporter":{"patch":{"tags":["CAPA Actions"],"description":"Bulk add or remove reporters across multiple Corrective Actions (CA) or Preventive Actions (PA)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actionIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"add":{"default":[],"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1}},"required":["userId","companyId"]}},"remove":{"default":[],"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1}},"required":["userId","companyId"]}}},"required":["actionIds"]}}}},"responses":{}}},"/api/capa/actions/bulk-severity":{"patch":{"tags":["CAPA Actions"],"description":"Bulk update severity for multiple Corrective Actions (CA) or Preventive Actions (PA)","requestBody":{"required":true,"content":{"application/json":{"schema":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"severity":{"type":"string","enum":["A","B","C","D","E"]}},"required":["id","severity"]}}}}},"responses":{}}},"/api/capa/actions/bulk-tags":{"patch":{"tags":["CAPA Actions"],"description":"Bulk update tags for multiple Corrective Actions (CA) or Preventive Actions (PA)","requestBody":{"required":true,"content":{"application/json":{"schema":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"tagIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["id","tagIds"]}}}}},"responses":{}}},"/api/capa/actions/quick-add-actions":{"post":{"tags":["CAPA Actions"],"description":"Quickly add a new Corrective/Preventive Action with optional CAP association","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"capId":{"nullable":true,"type":"string","minLength":1},"companyId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"auditFindingId":{"nullable":true,"type":"string"},"type":{"type":"string","enum":["CA","PA"]},"assignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1}},"required":["id","companyId"]}},"reporters":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1}},"required":["userId","companyId"]}},"impactAreaId":{"nullable":true,"type":"string"},"priority":{"type":"string","enum":["A","B","C","D","E"]}},"required":["companyId","title","auditFindingId","type"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"sourceType":{"nullable":true,"type":"string"},"sourceId":{"nullable":true,"type":"string"},"priority":{"nullable":true,"type":"string","enum":["A","B","C","D","E"]},"status":{"nullable":true,"type":"string","enum":["TO_DO","IN_PROGRESS","BLOCKED","IN_REVIEW","CHANGES_REQUESTED","DONE"]},"dueDate":{"nullable":true,"type":"string","format":"date-time"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"auditor":{"nullable":true,"type":"string"},"finding":{"nullable":true,"type":"string"},"goals":{"nullable":true,"type":"string"},"requirement":{"nullable":true,"type":"string"},"managementResponse":{"nullable":true,"type":"string"},"recommendation":{"nullable":true,"type":"string"},"rootCause":{"nullable":true,"type":"string"},"isArchived":{"type":"number"},"startedAt":{"nullable":true,"type":"string","format":"date-time"},"endedAt":{"nullable":true,"type":"string","format":"date-time"},"attachments":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"nullable":true,"type":"string"},"bucketName":{"type":"string"},"isPrivate":{"nullable":true,"type":"number"},"name":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","url","bucketName","isPrivate","name","contentType","fileSize","createdAt","createdByUserId"],"additionalProperties":false}},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"auditFindingId":{"nullable":true,"type":"string"},"assignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"reporters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"ownerCompanyId":{"nullable":true,"type":"string"},"ownerCompanyName":{"nullable":true,"type":"string"},"internalCompanyCode":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"generatedBy":{"nullable":true,"type":"string"},"owner":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"}},"required":["id","name","facilityProcesses","country","countryName"],"additionalProperties":false},"source":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"auditTypeId":{"nullable":true,"type":"string"},"auditTypeName":{"nullable":true,"type":"string"},"referenceNumber":{"nullable":true,"type":"string"},"auditDate":{"nullable":true,"type":"string","format":"date-time"},"facilityScore":{"nullable":true,"type":"string"}},"required":["id","name","auditTypeId","auditTypeName","referenceNumber","auditDate","facilityScore"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"objectId":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"revision":{"type":"string"},"submittedOn":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","objectId","version","status","revision","submittedOn"],"additionalProperties":false},{"type":"object","properties":{},"additionalProperties":false}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}},"cap":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"nullable":true,"type":"string"},"priority":{"nullable":true,"type":"string","enum":["A","B","C","D","E"]},"dueDate":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","title","status","priority","dueDate"],"additionalProperties":false},"watchers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"users":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"type":{"type":"string"},"companyId":{"nullable":true,"type":"string"}},"required":["userId","type","companyId"],"additionalProperties":false}},"companies":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"type":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"}},"required":["companyId","type","name","officialName","country","countryName","facilityProcesses"],"additionalProperties":false}},"remediationRequest":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"status":{"type":"string"},"message":{"type":"string"},"attachmentFileIds":{"type":"array","items":{"type":"string"}},"requestedChangeMessage":{"nullable":true,"type":"string"},"requestedChangeDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"requestedChangeUserId":{"nullable":true,"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"nullable":true,"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"nullable":true,"type":"string"},"bucketName":{"type":"string"},"isPrivate":{"nullable":true,"type":"number"},"name":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","url","bucketName","isPrivate","name","contentType","fileSize","createdAt"],"additionalProperties":false}}},"required":["id","actionId","status","message","attachmentFileIds","createdAt","createdByUserId","createdByCompanyId","updatedAt","files"],"additionalProperties":false},"linkedActions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"nullable":true,"type":"string"},"status":{"type":"string"},"description":{"nullable":true,"type":"string"},"sourceType":{"nullable":true,"type":"string"},"sourceId":{"nullable":true,"type":"string"},"ownerCompanyId":{"nullable":true,"type":"string"},"ownerCompanyName":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","title","type","status","description","sourceType","sourceId","ownerCompanyId","ownerCompanyName","createdAt"],"additionalProperties":false}}},"required":["id","title","description","type","impactAreaId","sourceType","sourceId","priority","status","dueDate","createdAt","updatedAt","auditor","finding","goals","requirement","managementResponse","recommendation","rootCause","isArchived","startedAt","endedAt","attachments","createdByUserId","createdByCompanyId","auditFindingId","assignees","reporters","ownerCompanyId","ownerCompanyName","watchers"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/capa/actions/{id}/link":{"post":{"tags":["CAPA Actions"],"description":"Link actions together","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actionIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["actionIds"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"linkedCount":{"type":"number"}},"required":["linkedCount"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/capa/actions/{id}/unlink":{"post":{"tags":["CAPA Actions"],"description":"Unlink actions","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actionIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["actionIds"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"unlinkedCount":{"type":"number"}},"required":["unlinkedCount"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/capa/actions/{actionId}/comments/":{"get":{"tags":["CAPA"],"description":"List action comments with pagination and visibility filter","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"count","required":false},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"type":"string","enum":["PUBLIC","PRIVATE","ADMINNOTE"]},"in":"query","name":"visibility","required":false,"description":"Filter comments by visibility level"},{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"actionId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"content":{"type":"string"},"repliedTo":{"nullable":true,"type":"string"},"parentcomment":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"createdByUserId":{"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"createdByCompanyId":{"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"createdByCompanyAvatar":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","content","createdByUserId","createdByUserName","createdByCompanyId","createdByCompanyName","createdByCompanyAvatar","createdAt"],"additionalProperties":false},"attachmentIds":{"type":"array","items":{"type":"string"}},"visibility":{"type":"string","enum":["PUBLIC","PRIVATE","ADMINNOTE"]},"createdAt":{"type":"string"},"createdByUserId":{"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"createdByCompanyId":{"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"createdByCompanyAvatar":{"nullable":true,"type":"string"},"readByCompanyIds":{"type":"array","items":{"type":"string"}},"updatedAt":{"nullable":true,"type":"string"},"isEdited":{"type":"boolean"}},"required":["id","actionId","content","repliedTo","parentcomment","attachmentIds","visibility","createdAt","createdByUserId","createdByUserName","createdByCompanyId","createdByCompanyName","createdByCompanyAvatar","readByCompanyIds","updatedAt","isEdited"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"tags":["CAPA"],"description":"Create a new comment on a CAPA action","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":2000},"repliedTo":{"nullable":true,"type":"string","minLength":1,"maxLength":36},"visibility":{"default":"PUBLIC","type":"string","enum":["PUBLIC","PRIVATE","ADMINNOTE"]},"attachmentIds":{"default":[],"type":"array","items":{"type":"string","minLength":1,"maxLength":36}}},"required":["content"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"actionId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"content":{"type":"string"},"repliedTo":{"nullable":true,"type":"string"},"attachmentIds":{"type":"array","items":{"type":"string"}},"visibility":{"type":"string","enum":["PUBLIC","PRIVATE","ADMINNOTE"]},"createdAt":{"type":"string"},"createdByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"updatedAt":{"nullable":true,"type":"string"}},"required":["id","actionId","content","repliedTo","attachmentIds","visibility","createdAt","createdByUserId","createdByCompanyId","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/capa/actions/{actionId}/comments/{commentId}":{"patch":{"tags":["CAPA"],"description":"Update an existing comment on a CAPA action","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":2000},"attachmentIds":{"default":[],"type":"array","items":{"type":"string","minLength":1,"maxLength":36}}},"required":["content"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"actionId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"commentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"content":{"type":"string"},"repliedTo":{"nullable":true,"type":"string"},"attachmentIds":{"type":"array","items":{"type":"string"}},"visibility":{"type":"string","enum":["PUBLIC","PRIVATE","ADMINNOTE"]},"createdAt":{"type":"string"},"createdByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"isEdited":{"type":"boolean"}},"required":["id","actionId","content","repliedTo","attachmentIds","visibility","createdAt","createdByUserId","createdByCompanyId","updatedAt","isEdited"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/capa/actions/{actionId}/histories/":{"get":{"tags":["CAPA"],"description":"List action history records with pagination","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"count","required":false},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"actionId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"userId":{"type":"string"},"companyId":{"type":"string"},"companyName":{"nullable":true,"type":"string"},"firstName":{"nullable":true,"type":"string"},"lastName":{"nullable":true,"type":"string"},"type":{"type":"string"},"property":{"nullable":true,"type":"string"},"prevState":{"nullable":true},"newState":{"nullable":true},"createdAt":{"type":"string"}},"required":["id","actionId","userId","companyId","companyName","firstName","lastName","type","property","prevState","newState","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/api/capa/actions/{actionId}/remediation-requests/":{"post":{"tags":["CAPA"],"description":"Create a new remediation request for a CAPA action","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":5000},"attachmentIds":{"default":[],"type":"array","items":{"type":"string","minLength":1,"maxLength":36}},"status":{"default":"PENDING","type":"string","enum":["PENDING","SUBMITTED","CHANGES_REQUESTED","APPROVED"]}},"required":["message"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"actionId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"status":{"type":"string","enum":["PENDING","SUBMITTED","CHANGES_REQUESTED","APPROVED"]},"message":{"type":"string"},"attachmentFileIds":{"type":"array","items":{"type":"string"}},"requestedChangeMessage":{"nullable":true,"type":"string"},"requestedChangeDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"requestedChangeUserId":{"nullable":true,"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"nullable":true,"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"nullable":true,"type":"string"},"bucketName":{"type":"string"},"isPrivate":{"nullable":true,"type":"number"},"name":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","url","bucketName","isPrivate","name","contentType","fileSize","createdAt"],"additionalProperties":false}}},"required":["id","actionId","status","message","attachmentFileIds","createdAt","createdByUserId","createdByCompanyId","updatedAt","files"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"patch":{"tags":["CAPA"],"description":"Update a remediation request status for a CAPA action","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["PENDING","SUBMITTED","CHANGES_REQUESTED","APPROVED"]},"requestedChangeMessage":{"type":"string","minLength":1,"maxLength":5000}},"required":["status"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"actionId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"status":{"type":"string","enum":["PENDING","SUBMITTED","CHANGES_REQUESTED","APPROVED"]}},"required":["status"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/capa/actions/{actionId}/remediation-requests/download-files":{"get":{"tags":["CAPA"],"description":"Download all files from a remediation request as a zip","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"actionId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"}},"required":["id","url"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/capa/archive/":{"post":{"tags":["CAPA"],"description":"Archive multiple corrective action plans (CAPs)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actionIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["actionIds"]}}}},"parameters":[{"schema":{"default":false,"anyOf":[{"type":"boolean"},{"type":"string","enum":["true"]},{"type":"string","enum":["false"]}]},"in":"query","name":"includeLinkedActions","required":false}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/capa/cap-create/":{"post":{"tags":["CAPA"],"description":"Create a new Corrective Action Plan (CAP)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"description":{"nullable":true,"type":"string"},"actionIds":{"default":[],"type":"array","items":{"type":"string"}},"dueDate":{"nullable":true,"type":"string"},"sourceType":{"type":"string"},"sourceId":{"type":"string"},"severity":{"type":"string","enum":["A","B","C","D","E"]},"impactAreaId":{"nullable":true,"type":"string"},"impactAreaExtractedName":{"type":"string"},"assignee":{"nullable":true,"type":"object","properties":{"id":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1}},"required":["id","companyId"]},"assigneeExtractedName":{"type":"string"},"collaborator":{"nullable":true,"type":"object","properties":{"companyId":{"type":"string","minLength":1}},"required":["companyId"]},"collaboratorExtractedName":{"type":"string"},"reporters":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1}},"required":["userId","companyId"]}}},"required":["companyId","title"]}}}},"parameters":[{"schema":{},"in":"query","name":"updateLinkedActions","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"actionId":{"type":"string"}},"required":["success","message","actionId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/capa/caps/":{"get":{"tags":["CAPA"],"description":"List corrective and preventive actions (CAP)","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"count","required":false},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false,"description":"JSON string with filter criteria for corrective and preventive actions"},{"schema":{"default":"all","type":"string","enum":["all","internal","external","assignedToMe"]},"in":"query","name":"quickFilter","required":false,"description":"Quick filter options: 'all' for all accessible actions, 'internal' for actions owned by your company, 'external' for actions owned by other companies, 'assignedToMe' for actions assigned to you"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"sourceType":{"nullable":true,"type":"string"},"sourceId":{"nullable":true,"type":"string"},"priority":{"nullable":true,"type":"string","enum":["A","B","C","D","E"]},"status":{"nullable":true,"type":"string"},"dueDate":{"nullable":true,"type":"string","format":"date-time"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"auditor":{"nullable":true,"type":"string"},"finding":{"nullable":true,"type":"string"},"goals":{"nullable":true,"type":"string"},"requirement":{"nullable":true,"type":"string"},"managementResponse":{"nullable":true,"type":"string"},"recommendation":{"nullable":true,"type":"string"},"rootCause":{"nullable":true,"type":"string"},"isArchived":{"type":"number"},"startedAt":{"nullable":true,"type":"string","format":"date-time"},"endedAt":{"nullable":true,"type":"string","format":"date-time"},"attachments":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"auditFindingId":{"nullable":true,"type":"string"},"assignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"reporters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"ownerCompanyId":{"nullable":true,"type":"string"},"ownerCompanyName":{"nullable":true,"type":"string"},"internalCompanyCode":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"owner":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"}},"required":["id","name","facilityProcesses","country","countryName"],"additionalProperties":false},"source":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"auditTypeId":{"nullable":true,"type":"string"},"auditTypeName":{"nullable":true,"type":"string"},"referenceNumber":{"nullable":true,"type":"string"},"auditDate":{"nullable":true,"type":"string","format":"date-time"},"facilityScore":{"nullable":true,"type":"string"}},"required":["id","name","auditTypeId","auditTypeName","referenceNumber","auditDate","facilityScore"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"objectId":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"revision":{"type":"string"},"submittedOn":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","objectId","version","status","revision","submittedOn"],"additionalProperties":false},{"type":"object","properties":{},"additionalProperties":false}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}},"progress":{"type":"object","properties":{"toDo":{"type":"number"},"inProgress":{"type":"number"},"blocked":{"type":"number"},"inReview":{"type":"number"},"changesRequested":{"type":"number"},"done":{"type":"number"},"total":{"type":"number"},"calculatedProgress":{"nullable":true,"type":"number"}},"required":["toDo","inProgress","blocked","inReview","changesRequested","done","total","calculatedProgress"],"additionalProperties":false},"watchers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"findings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"auditId":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"urgency":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"dueDate":{"nullable":true,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"string","format":"date-time"}]},"isArchived":{"type":"number"},"status":{"type":"string","enum":["TO_DO","IN_PROGRESS","DONE"]},"assigneeUserId":{"nullable":true,"type":"string"},"externalSource":{"nullable":true,"type":"string"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}}},"required":["id","auditId","title","description","urgency","source","impactAreaId","type","dueDate","isArchived","status","assigneeUserId","externalSource","tags"],"additionalProperties":false}},"companies":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"type":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"}},"required":["companyId","type","name","officialName","country","countryName","facilityProcesses"],"additionalProperties":false}}},"required":["id","title","description","type","impactAreaId","sourceType","sourceId","priority","status","dueDate","createdAt","updatedAt","auditor","finding","goals","requirement","managementResponse","recommendation","rootCause","isArchived","startedAt","endedAt","attachments","createdByUserId","createdByCompanyId","createdByCompanyName","auditFindingId","assignees","reporters","ownerCompanyId","ownerCompanyName","progress","watchers","findings"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","pageSize","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"tags":["CAPA"],"description":"Create a new CAP (Corrective Action Plan)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":4000},"companyId":{"type":"string","minLength":1},"sourceType":{"type":"string","minLength":1},"sourceId":{"type":"string","minLength":1},"assignees":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1}},"required":["userId","companyId"]}},"reporters":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1}},"required":["userId","companyId"]}},"dueDate":{"nullable":true,"type":"string"},"tags":{"nullable":true,"type":"array","items":{"type":"string"}}},"required":["title","companyId","sourceType","sourceId","dueDate","tags"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"sourceType":{"nullable":true,"type":"string"},"sourceId":{"nullable":true,"type":"string"},"priority":{"nullable":true,"type":"string","enum":["A","B","C","D","E"]},"status":{"nullable":true,"type":"string"},"dueDate":{"nullable":true,"type":"string","format":"date-time"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"auditor":{"nullable":true,"type":"string"},"finding":{"nullable":true,"type":"string"},"goals":{"nullable":true,"type":"string"},"requirement":{"nullable":true,"type":"string"},"managementResponse":{"nullable":true,"type":"string"},"recommendation":{"nullable":true,"type":"string"},"rootCause":{"nullable":true,"type":"string"},"isArchived":{"type":"number"},"startedAt":{"nullable":true,"type":"string","format":"date-time"},"endedAt":{"nullable":true,"type":"string","format":"date-time"},"attachments":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"auditFindingId":{"nullable":true,"type":"string"},"assignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"reporters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"ownerCompanyId":{"nullable":true,"type":"string"},"ownerCompanyName":{"nullable":true,"type":"string"},"internalCompanyCode":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"owner":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"}},"required":["id","name","facilityProcesses","country","countryName"],"additionalProperties":false},"source":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"auditTypeId":{"nullable":true,"type":"string"},"auditTypeName":{"nullable":true,"type":"string"},"referenceNumber":{"nullable":true,"type":"string"},"auditDate":{"nullable":true,"type":"string","format":"date-time"},"facilityScore":{"nullable":true,"type":"string"}},"required":["id","name","auditTypeId","auditTypeName","referenceNumber","auditDate","facilityScore"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"objectId":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"revision":{"type":"string"},"submittedOn":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","objectId","version","status","revision","submittedOn"],"additionalProperties":false},{"type":"object","properties":{},"additionalProperties":false}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}},"progress":{"type":"object","properties":{"toDo":{"type":"number"},"inProgress":{"type":"number"},"blocked":{"type":"number"},"inReview":{"type":"number"},"changesRequested":{"type":"number"},"done":{"type":"number"},"total":{"type":"number"},"calculatedProgress":{"nullable":true,"type":"number"}},"required":["toDo","inProgress","blocked","inReview","changesRequested","done","total","calculatedProgress"],"additionalProperties":false},"watchers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"findings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"auditId":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"urgency":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"dueDate":{"nullable":true,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"string","format":"date-time"}]},"isArchived":{"type":"number"},"status":{"type":"string","enum":["TO_DO","IN_PROGRESS","DONE"]},"assigneeUserId":{"nullable":true,"type":"string"},"externalSource":{"nullable":true,"type":"string"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}}},"required":["id","auditId","title","description","urgency","source","impactAreaId","type","dueDate","isArchived","status","assigneeUserId","externalSource","tags"],"additionalProperties":false}},"companies":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"type":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"}},"required":["companyId","type","name","officialName","country","countryName","facilityProcesses"],"additionalProperties":false}}},"required":["id","title","description","type","impactAreaId","sourceType","sourceId","priority","status","dueDate","createdAt","updatedAt","auditor","finding","goals","requirement","managementResponse","recommendation","rootCause","isArchived","startedAt","endedAt","attachments","createdByUserId","createdByCompanyId","createdByCompanyName","auditFindingId","assignees","reporters","ownerCompanyId","ownerCompanyName","progress","watchers","findings"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/capa/caps/filter-sources":{"get":{"tags":["CAPA"],"description":"List the deduplicated Source filter options for the plans list: distinct audit types of source audits plus an SLCP pseudo-type when SLCP sources exist","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"}},"required":["key","name"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/capa/caps/{capId}/suggested-actions":{"get":{"tags":["CAPA"],"description":"List available actions grouped by their Audit Finding","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"capId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"findings":{"minItems":0,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"type":{"type":"string"},"source":{"type":"string"},"urgency":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["TO_DO","IN_PROGRESS","DONE"]},"auditId":{"nullable":true,"type":"string"},"externalSource":{"nullable":true,"type":"string"},"additionalInformation":{"nullable":true,"type":"string"},"assigneeUserId":{"nullable":true,"type":"string"},"dueDate":{"nullable":true,"type":"string"},"suggestedActions":{"nullable":true,"type":"string"},"rootCauseAnalysis":{"nullable":true,"type":"string"},"genderedImplications":{"nullable":true,"type":"string"},"isRemoved":{"type":"number"},"isArchived":{"type":"boolean"},"createdAt":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"actionCount":{"type":"number"},"planCount":{"type":"number"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}},"sourceObject":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"auditTypeId":{"nullable":true,"type":"string"},"auditTypeName":{"nullable":true,"type":"string"},"referenceNumber":{"nullable":true,"type":"string"},"auditDate":{"nullable":true,"type":"string"},"facilityScore":{"nullable":true,"type":"string"}},"required":["id","name","auditTypeId","auditTypeName","referenceNumber","auditDate","facilityScore"],"additionalProperties":{}},{"type":"object","properties":{"id":{"type":"string"},"objectId":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"revision":{"type":"string"},"submittedOn":{"nullable":true,"type":"string"}},"required":["id","objectId","version","status","revision","submittedOn"],"additionalProperties":{}},{"type":"object","properties":{},"additionalProperties":{}}]},"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"sourceType":{"nullable":true,"type":"string"},"sourceId":{"nullable":true,"type":"string"},"priority":{"nullable":true,"type":"string","enum":["A","B","C","D","E"]},"status":{"nullable":true,"type":"string","enum":["TO_DO","IN_PROGRESS","BLOCKED","IN_REVIEW","CHANGES_REQUESTED","DONE"]},"dueDate":{"nullable":true,"type":"string","format":"date-time"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"auditor":{"nullable":true,"type":"string"},"finding":{"nullable":true,"type":"string"},"goals":{"nullable":true,"type":"string"},"requirement":{"nullable":true,"type":"string"},"managementResponse":{"nullable":true,"type":"string"},"recommendation":{"nullable":true,"type":"string"},"rootCause":{"nullable":true,"type":"string"},"isArchived":{"type":"number"},"startedAt":{"nullable":true,"type":"string","format":"date-time"},"endedAt":{"nullable":true,"type":"string","format":"date-time"},"attachments":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"nullable":true,"type":"string"},"bucketName":{"type":"string"},"isPrivate":{"nullable":true,"type":"number"},"name":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","url","bucketName","isPrivate","name","contentType","fileSize","createdAt","createdByUserId"],"additionalProperties":false}},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"auditFindingId":{"nullable":true,"type":"string"},"assignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"reporters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"ownerCompanyId":{"nullable":true,"type":"string"},"ownerCompanyName":{"nullable":true,"type":"string"},"internalCompanyCode":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"generatedBy":{"nullable":true,"type":"string"},"owner":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"}},"required":["id","name","facilityProcesses","country","countryName"],"additionalProperties":false},"source":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"auditTypeId":{"nullable":true,"type":"string"},"auditTypeName":{"nullable":true,"type":"string"},"referenceNumber":{"nullable":true,"type":"string"},"auditDate":{"nullable":true,"type":"string","format":"date-time"},"facilityScore":{"nullable":true,"type":"string"}},"required":["id","name","auditTypeId","auditTypeName","referenceNumber","auditDate","facilityScore"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"objectId":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"revision":{"type":"string"},"submittedOn":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","objectId","version","status","revision","submittedOn"],"additionalProperties":false},{"type":"object","properties":{},"additionalProperties":false}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}},"cap":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"nullable":true,"type":"string"},"priority":{"nullable":true,"type":"string","enum":["A","B","C","D","E"]},"dueDate":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","title","status","priority","dueDate"],"additionalProperties":false},"watchers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"users":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"type":{"type":"string"},"companyId":{"nullable":true,"type":"string"}},"required":["userId","type","companyId"],"additionalProperties":false}},"companies":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"type":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"}},"required":["companyId","type","name","officialName","country","countryName","facilityProcesses"],"additionalProperties":false}},"remediationRequest":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"status":{"type":"string"},"message":{"type":"string"},"attachmentFileIds":{"type":"array","items":{"type":"string"}},"requestedChangeMessage":{"nullable":true,"type":"string"},"requestedChangeDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"requestedChangeUserId":{"nullable":true,"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"nullable":true,"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"nullable":true,"type":"string"},"bucketName":{"type":"string"},"isPrivate":{"nullable":true,"type":"number"},"name":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","url","bucketName","isPrivate","name","contentType","fileSize","createdAt"],"additionalProperties":false}}},"required":["id","actionId","status","message","attachmentFileIds","createdAt","createdByUserId","createdByCompanyId","updatedAt","files"],"additionalProperties":false},"linkedActions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"nullable":true,"type":"string"},"status":{"type":"string"},"description":{"nullable":true,"type":"string"},"sourceType":{"nullable":true,"type":"string"},"sourceId":{"nullable":true,"type":"string"},"ownerCompanyId":{"nullable":true,"type":"string"},"ownerCompanyName":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","title","type","status","description","sourceType","sourceId","ownerCompanyId","ownerCompanyName","createdAt"],"additionalProperties":false}}},"required":["id","title","description","type","impactAreaId","sourceType","sourceId","priority","status","dueDate","createdAt","updatedAt","auditor","finding","goals","requirement","managementResponse","recommendation","rootCause","isArchived","startedAt","endedAt","attachments","createdByUserId","createdByCompanyId","auditFindingId","assignees","reporters","ownerCompanyId","ownerCompanyName","watchers"],"additionalProperties":false}}},"required":["id","title","description","companyId","type","source","urgency","impactAreaId","status","auditId","externalSource","additionalInformation","assigneeUserId","dueDate","suggestedActions","rootCauseAnalysis","genderedImplications","isRemoved","isArchived","createdAt","createdByUserId","updatedAt","updatedByUserId","createdByCompanyId","createdByImpersonateId","updatedByCompanyId","updatedByImpersonateId","updatedByImpersonateName","updatedByUserName","updatedByCompanyName","createdByApiKeyId","createdByApiKeyLabel","updatedByApiKeyId","updatedByApiKeyLabel","actionCount","planCount","tags","actions"],"additionalProperties":false}}},"required":["findings"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/capa/caps/{id}":{"get":{"tags":["CAPA"],"description":"Get CAP details by ID","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"sourceType":{"nullable":true,"type":"string"},"sourceId":{"nullable":true,"type":"string"},"priority":{"nullable":true,"type":"string","enum":["A","B","C","D","E"]},"status":{"nullable":true,"type":"string"},"dueDate":{"nullable":true,"type":"string","format":"date-time"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"auditor":{"nullable":true,"type":"string"},"finding":{"nullable":true,"type":"string"},"goals":{"nullable":true,"type":"string"},"requirement":{"nullable":true,"type":"string"},"managementResponse":{"nullable":true,"type":"string"},"recommendation":{"nullable":true,"type":"string"},"rootCause":{"nullable":true,"type":"string"},"isArchived":{"type":"number"},"startedAt":{"nullable":true,"type":"string","format":"date-time"},"endedAt":{"nullable":true,"type":"string","format":"date-time"},"attachments":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"auditFindingId":{"nullable":true,"type":"string"},"assignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"reporters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"ownerCompanyId":{"nullable":true,"type":"string"},"ownerCompanyName":{"nullable":true,"type":"string"},"internalCompanyCode":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"owner":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"}},"required":["id","name","facilityProcesses","country","countryName"],"additionalProperties":false},"source":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"auditTypeId":{"nullable":true,"type":"string"},"auditTypeName":{"nullable":true,"type":"string"},"referenceNumber":{"nullable":true,"type":"string"},"auditDate":{"nullable":true,"type":"string","format":"date-time"},"facilityScore":{"nullable":true,"type":"string"}},"required":["id","name","auditTypeId","auditTypeName","referenceNumber","auditDate","facilityScore"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"objectId":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"revision":{"type":"string"},"submittedOn":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","objectId","version","status","revision","submittedOn"],"additionalProperties":false},{"type":"object","properties":{},"additionalProperties":false}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}},"progress":{"type":"object","properties":{"toDo":{"type":"number"},"inProgress":{"type":"number"},"blocked":{"type":"number"},"inReview":{"type":"number"},"changesRequested":{"type":"number"},"done":{"type":"number"},"total":{"type":"number"},"calculatedProgress":{"nullable":true,"type":"number"}},"required":["toDo","inProgress","blocked","inReview","changesRequested","done","total","calculatedProgress"],"additionalProperties":false},"watchers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"findings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"auditId":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"urgency":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"dueDate":{"nullable":true,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"string","format":"date-time"}]},"isArchived":{"type":"number"},"status":{"type":"string","enum":["TO_DO","IN_PROGRESS","DONE"]},"assigneeUserId":{"nullable":true,"type":"string"},"externalSource":{"nullable":true,"type":"string"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}}},"required":["id","auditId","title","description","urgency","source","impactAreaId","type","dueDate","isArchived","status","assigneeUserId","externalSource","tags"],"additionalProperties":false}},"companies":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"type":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"}},"required":["companyId","type","name","officialName","country","countryName","facilityProcesses"],"additionalProperties":false}},"userRoles":{"type":"array","items":{"type":"string"}},"companyRoles":{"type":"array","items":{"type":"string"}}},"required":["id","title","description","type","impactAreaId","sourceType","sourceId","priority","status","dueDate","createdAt","updatedAt","auditor","finding","goals","requirement","managementResponse","recommendation","rootCause","isArchived","startedAt","endedAt","attachments","createdByUserId","createdByCompanyId","createdByCompanyName","auditFindingId","assignees","reporters","ownerCompanyId","ownerCompanyName","progress","watchers","findings","userRoles","companyRoles"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}},"patch":{"tags":["CAPA"],"description":"Update a CAP (Corrective Action Plan)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":4000},"description":{"type":"string"},"dueDate":{"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"assignees":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1}},"required":["userId","companyId"]}},"reporters":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1}},"required":["userId","companyId"]}},"collaboratorIds":{"type":"array","items":{"type":"string"}},"tagIds":{"type":"array","items":{"type":"string"}}}}}}},"parameters":[{"schema":{},"in":"query","name":"updateLinkedActions","required":false},{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"sourceType":{"nullable":true,"type":"string"},"sourceId":{"nullable":true,"type":"string"},"priority":{"nullable":true,"type":"string","enum":["A","B","C","D","E"]},"status":{"nullable":true,"type":"string"},"dueDate":{"nullable":true,"type":"string","format":"date-time"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"auditor":{"nullable":true,"type":"string"},"finding":{"nullable":true,"type":"string"},"goals":{"nullable":true,"type":"string"},"requirement":{"nullable":true,"type":"string"},"managementResponse":{"nullable":true,"type":"string"},"recommendation":{"nullable":true,"type":"string"},"rootCause":{"nullable":true,"type":"string"},"isArchived":{"type":"number"},"startedAt":{"nullable":true,"type":"string","format":"date-time"},"endedAt":{"nullable":true,"type":"string","format":"date-time"},"attachments":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"auditFindingId":{"nullable":true,"type":"string"},"assignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"reporters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"ownerCompanyId":{"nullable":true,"type":"string"},"ownerCompanyName":{"nullable":true,"type":"string"},"internalCompanyCode":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"owner":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"}},"required":["id","name","facilityProcesses","country","countryName"],"additionalProperties":false},"source":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"auditTypeId":{"nullable":true,"type":"string"},"auditTypeName":{"nullable":true,"type":"string"},"referenceNumber":{"nullable":true,"type":"string"},"auditDate":{"nullable":true,"type":"string","format":"date-time"},"facilityScore":{"nullable":true,"type":"string"}},"required":["id","name","auditTypeId","auditTypeName","referenceNumber","auditDate","facilityScore"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"objectId":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"revision":{"type":"string"},"submittedOn":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","objectId","version","status","revision","submittedOn"],"additionalProperties":false},{"type":"object","properties":{},"additionalProperties":false}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}},"progress":{"type":"object","properties":{"toDo":{"type":"number"},"inProgress":{"type":"number"},"blocked":{"type":"number"},"inReview":{"type":"number"},"changesRequested":{"type":"number"},"done":{"type":"number"},"total":{"type":"number"},"calculatedProgress":{"nullable":true,"type":"number"}},"required":["toDo","inProgress","blocked","inReview","changesRequested","done","total","calculatedProgress"],"additionalProperties":false},"watchers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"findings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"auditId":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"urgency":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"dueDate":{"nullable":true,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"string","format":"date-time"}]},"isArchived":{"type":"number"},"status":{"type":"string","enum":["TO_DO","IN_PROGRESS","DONE"]},"assigneeUserId":{"nullable":true,"type":"string"},"externalSource":{"nullable":true,"type":"string"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}}},"required":["id","auditId","title","description","urgency","source","impactAreaId","type","dueDate","isArchived","status","assigneeUserId","externalSource","tags"],"additionalProperties":false}},"companies":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"type":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"}},"required":["companyId","type","name","officialName","country","countryName","facilityProcesses"],"additionalProperties":false}}},"required":["id","title","description","type","impactAreaId","sourceType","sourceId","priority","status","dueDate","createdAt","updatedAt","auditor","finding","goals","requirement","managementResponse","recommendation","rootCause","isArchived","startedAt","endedAt","attachments","createdByUserId","createdByCompanyId","createdByCompanyName","auditFindingId","assignees","reporters","ownerCompanyId","ownerCompanyName","progress","watchers","findings"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/capa/caps/archive":{"get":{"tags":["CAPA"],"description":"List archived corrective and preventive actions (CAP)","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"count","required":false},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false,"description":"JSON string with filter criteria for corrective and preventive actions"},{"schema":{"default":"all","type":"string","enum":["all","internal","external","assignedToMe"]},"in":"query","name":"quickFilter","required":false,"description":"Quick filter options: 'all' for all accessible actions, 'internal' for actions owned by your company, 'external' for actions owned by other companies, 'assignedToMe' for actions assigned to you"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"sourceType":{"nullable":true,"type":"string"},"sourceId":{"nullable":true,"type":"string"},"priority":{"nullable":true,"type":"string","enum":["A","B","C","D","E"]},"status":{"nullable":true,"type":"string"},"dueDate":{"nullable":true,"type":"string","format":"date-time"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"auditor":{"nullable":true,"type":"string"},"finding":{"nullable":true,"type":"string"},"goals":{"nullable":true,"type":"string"},"requirement":{"nullable":true,"type":"string"},"managementResponse":{"nullable":true,"type":"string"},"recommendation":{"nullable":true,"type":"string"},"rootCause":{"nullable":true,"type":"string"},"isArchived":{"type":"number"},"startedAt":{"nullable":true,"type":"string","format":"date-time"},"endedAt":{"nullable":true,"type":"string","format":"date-time"},"attachments":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"auditFindingId":{"nullable":true,"type":"string"},"assignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"reporters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"ownerCompanyId":{"nullable":true,"type":"string"},"ownerCompanyName":{"nullable":true,"type":"string"},"internalCompanyCode":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"owner":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"}},"required":["id","name","facilityProcesses","country","countryName"],"additionalProperties":false},"source":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"auditTypeId":{"nullable":true,"type":"string"},"auditTypeName":{"nullable":true,"type":"string"},"referenceNumber":{"nullable":true,"type":"string"},"auditDate":{"nullable":true,"type":"string","format":"date-time"},"facilityScore":{"nullable":true,"type":"string"}},"required":["id","name","auditTypeId","auditTypeName","referenceNumber","auditDate","facilityScore"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"objectId":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"revision":{"type":"string"},"submittedOn":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","objectId","version","status","revision","submittedOn"],"additionalProperties":false},{"type":"object","properties":{},"additionalProperties":false}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}},"progress":{"type":"object","properties":{"toDo":{"type":"number"},"inProgress":{"type":"number"},"blocked":{"type":"number"},"inReview":{"type":"number"},"changesRequested":{"type":"number"},"done":{"type":"number"},"total":{"type":"number"},"calculatedProgress":{"nullable":true,"type":"number"}},"required":["toDo","inProgress","blocked","inReview","changesRequested","done","total","calculatedProgress"],"additionalProperties":false},"watchers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"firstName":{"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","name","firstName","lastName","companyId","avatarFileUrl"],"additionalProperties":false}},"findings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"auditId":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"urgency":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"dueDate":{"nullable":true,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"string","format":"date-time"}]},"isArchived":{"type":"number"},"status":{"type":"string","enum":["TO_DO","IN_PROGRESS","DONE"]},"assigneeUserId":{"nullable":true,"type":"string"},"externalSource":{"nullable":true,"type":"string"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}}},"required":["id","auditId","title","description","urgency","source","impactAreaId","type","dueDate","isArchived","status","assigneeUserId","externalSource","tags"],"additionalProperties":false}},"companies":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"type":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"}},"required":["companyId","type","name","officialName","country","countryName","facilityProcesses"],"additionalProperties":false}}},"required":["id","title","description","type","impactAreaId","sourceType","sourceId","priority","status","dueDate","createdAt","updatedAt","auditor","finding","goals","requirement","managementResponse","recommendation","rootCause","isArchived","startedAt","endedAt","attachments","createdByUserId","createdByCompanyId","createdByCompanyName","auditFindingId","assignees","reporters","ownerCompanyId","ownerCompanyName","progress","watchers","findings"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","pageSize","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/api/capa/caps/{capId}/histories/":{"get":{"tags":["CAPA"],"description":"List CAP history records with pagination","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"count","required":false},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"capId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"userId":{"type":"string"},"companyId":{"type":"string"},"companyName":{"nullable":true,"type":"string"},"firstName":{"nullable":true,"type":"string"},"lastName":{"nullable":true,"type":"string"},"type":{"type":"string"},"property":{"nullable":true,"type":"string"},"prevState":{"nullable":true},"newState":{"nullable":true},"createdAt":{"type":"string"}},"required":["id","actionId","userId","companyId","companyName","firstName","lastName","type","property","prevState","newState","createdAt"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/api/capa/delete/":{"post":{"tags":["CAPA"],"description":"Hard delete multiple CAPA actions (CA/PA) or plans (CAP). Unrecoverable. Only the creator user, acting under the company the item was created with, can delete. For plans, includeLinkedActions also deletes their linked actions; otherwise the links are removed and the actions are kept.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actionIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["actionIds"]}}}},"parameters":[{"schema":{"default":false,"anyOf":[{"type":"boolean"},{"type":"string","enum":["true"]},{"type":"string","enum":["false"]}]},"in":"query","name":"includeLinkedActions","required":false}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/capa/findings/details/{id}":{"get":{"tags":["CAPA Findings"],"description":"Get finding details by ID","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"type":{"type":"string"},"source":{"type":"string"},"urgency":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["TO_DO","IN_PROGRESS","DONE"]},"auditId":{"nullable":true,"type":"string"},"externalSource":{"nullable":true,"type":"string"},"additionalInformation":{"nullable":true,"type":"string"},"assigneeUserId":{"nullable":true,"type":"string"},"dueDate":{"nullable":true,"type":"string"},"suggestedActions":{"nullable":true,"type":"string"},"rootCauseAnalysis":{"nullable":true,"type":"string"},"genderedImplications":{"nullable":true,"type":"string"},"isRemoved":{"type":"number"},"isArchived":{"type":"boolean"},"createdAt":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"actionCount":{"type":"number"},"planCount":{"type":"number"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}},"sourceObject":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"auditTypeId":{"nullable":true,"type":"string"},"auditTypeName":{"nullable":true,"type":"string"},"referenceNumber":{"nullable":true,"type":"string"},"auditDate":{"nullable":true,"type":"string"},"facilityScore":{"nullable":true,"type":"string"}},"required":["id","name","auditTypeId","auditTypeName","referenceNumber","auditDate","facilityScore"],"additionalProperties":{}},{"type":"object","properties":{"id":{"type":"string"},"objectId":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"revision":{"type":"string"},"submittedOn":{"nullable":true,"type":"string"}},"required":["id","objectId","version","status","revision","submittedOn"],"additionalProperties":{}},{"type":"object","properties":{},"additionalProperties":{}}]}},"required":["id","title","description","companyId","type","source","urgency","impactAreaId","status","auditId","externalSource","additionalInformation","assigneeUserId","dueDate","suggestedActions","rootCauseAnalysis","genderedImplications","isRemoved","isArchived","createdAt","createdByUserId","updatedAt","updatedByUserId","createdByCompanyId","createdByImpersonateId","updatedByCompanyId","updatedByImpersonateId","updatedByImpersonateName","updatedByUserName","updatedByCompanyName","createdByApiKeyId","createdByApiKeyLabel","updatedByApiKeyId","updatedByApiKeyLabel","actionCount","planCount","tags"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/capa/findings/my-company/":{"get":{"tags":["CAPA Findings"],"description":"CAPA findings list for my company","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"count","required":false},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false,"description":"JSON string with filter criteria, e.g., {\"title\": \"specific title\", \"description\": \"description text\", \"urgency\": \"A\", \"source\": \"AI_GENERATED\", \"status\": \"OPEN\", \"type\": \"AUDIT\", \"assignee\": \"John Smith\", \"assigneeUserId\": \"user-123\", \"impactAreaId\": \"area-456\", \"dueDateFrom\": \"2024-01-01\", \"dueDateTo\": \"2024-12-31\", \"isOverdue\": true}. The assignee field accepts user names or email addresses for text search, while assigneeUserId is for exact user ID matching."},{"schema":{"type":"string"},"in":"query","name":"auditId","required":false},{"schema":{"type":"string"},"in":"query","name":"capId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"auditId":{"nullable":true,"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"urgency":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"suggestedActions":{"nullable":true,"type":"string"},"additionalInformation":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"companyName":{"nullable":true,"type":"string"},"isRemoved":{"type":"number"},"dueDate":{"nullable":true,"type":"string","format":"date-time"},"status":{"type":"string","enum":["TO_DO","IN_PROGRESS","DONE"]},"assigneeUserId":{"nullable":true,"type":"string"},"externalSource":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"actionCount":{"type":"number"},"planCount":{"type":"number"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}},"sourceObject":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"auditTypeId":{"nullable":true,"type":"string"},"auditTypeName":{"nullable":true,"type":"string"},"referenceNumber":{"nullable":true,"type":"string"},"auditDate":{"nullable":true,"type":"string","format":"date-time"},"facilityScore":{"nullable":true,"type":"string"}},"required":["id","name","auditTypeId","auditTypeName","referenceNumber","auditDate","facilityScore"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"objectId":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"revision":{"type":"string"},"submittedOn":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","objectId","version","status","revision","submittedOn"],"additionalProperties":false},{"type":"object","properties":{},"additionalProperties":false}]},"isLinkedToPlan":{"type":"number"}},"required":["id","auditId","title","description","urgency","source","impactAreaId","suggestedActions","additionalInformation","type","companyId","isRemoved","dueDate","status","assigneeUserId","externalSource","actionCount","planCount","tags"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","pageSize","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/api/capa/findings/my-company/archive":{"get":{"tags":["CAPA Findings"],"description":"Archived CAPA findings list for my company","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"count","required":false},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false,"description":"JSON string with filter criteria, e.g., {\"title\": \"specific title\", \"description\": \"description text\", \"urgency\": \"A\", \"source\": \"AI_GENERATED\", \"status\": \"OPEN\", \"type\": \"AUDIT\", \"assignee\": \"John Smith\", \"assigneeUserId\": \"user-123\", \"impactAreaId\": \"area-456\", \"dueDateFrom\": \"2024-01-01\", \"dueDateTo\": \"2024-12-31\", \"isOverdue\": true}. The assignee field accepts user names or email addresses for text search, while assigneeUserId is for exact user ID matching."},{"schema":{"type":"string"},"in":"query","name":"auditId","required":false},{"schema":{"type":"string"},"in":"query","name":"capId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"auditId":{"nullable":true,"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"urgency":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"suggestedActions":{"nullable":true,"type":"string"},"additionalInformation":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"companyName":{"nullable":true,"type":"string"},"isRemoved":{"type":"number"},"dueDate":{"nullable":true,"type":"string","format":"date-time"},"status":{"type":"string","enum":["TO_DO","IN_PROGRESS","DONE"]},"assigneeUserId":{"nullable":true,"type":"string"},"externalSource":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"actionCount":{"type":"number"},"planCount":{"type":"number"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}},"sourceObject":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"auditTypeId":{"nullable":true,"type":"string"},"auditTypeName":{"nullable":true,"type":"string"},"referenceNumber":{"nullable":true,"type":"string"},"auditDate":{"nullable":true,"type":"string","format":"date-time"},"facilityScore":{"nullable":true,"type":"string"}},"required":["id","name","auditTypeId","auditTypeName","referenceNumber","auditDate","facilityScore"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"objectId":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"revision":{"type":"string"},"submittedOn":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","objectId","version","status","revision","submittedOn"],"additionalProperties":false},{"type":"object","properties":{},"additionalProperties":false}]},"isLinkedToPlan":{"type":"number"}},"required":["id","auditId","title","description","urgency","source","impactAreaId","suggestedActions","additionalInformation","type","companyId","isRemoved","dueDate","status","assigneeUserId","externalSource","actionCount","planCount","tags"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","pageSize","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/api/capa/findings/network/":{"get":{"tags":["CAPA Findings"],"description":"CAPA findings list for network","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"count","required":false},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false,"description":"JSON string with filter criteria, e.g., {\"title\": \"specific title\", \"description\": \"description text\", \"urgency\": \"A\", \"source\": \"AI_GENERATED\", \"status\": \"OPEN\", \"type\": \"AUDIT\", \"assignee\": \"John Smith\", \"assigneeUserId\": \"user-123\", \"impactAreaId\": \"area-456\", \"dueDateFrom\": \"2024-01-01\", \"dueDateTo\": \"2024-12-31\", \"isOverdue\": true}. The assignee field accepts user names or email addresses for text search, while assigneeUserId is for exact user ID matching."},{"schema":{"type":"string"},"in":"query","name":"auditId","required":false},{"schema":{"type":"string"},"in":"query","name":"capId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"auditId":{"nullable":true,"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"urgency":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"suggestedActions":{"nullable":true,"type":"string"},"additionalInformation":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"companyName":{"nullable":true,"type":"string"},"isRemoved":{"type":"number"},"dueDate":{"nullable":true,"type":"string","format":"date-time"},"status":{"nullable":true,"type":"string"},"assigneeUserId":{"nullable":true,"type":"string"},"externalSource":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"actionCount":{"type":"number"},"planCount":{"type":"number"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}},"sourceObject":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"auditTypeId":{"nullable":true,"type":"string"},"auditTypeName":{"nullable":true,"type":"string"},"referenceNumber":{"nullable":true,"type":"string"},"auditDate":{"nullable":true,"type":"string","format":"date-time"},"facilityScore":{"nullable":true,"type":"string"}},"required":["id","name","auditTypeId","auditTypeName","referenceNumber","auditDate","facilityScore"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"objectId":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"revision":{"type":"string"},"submittedOn":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","objectId","version","status","revision","submittedOn"],"additionalProperties":false},{"type":"object","properties":{},"additionalProperties":false}]},"isLinkedToPlan":{"type":"number"}},"required":["id","auditId","title","description","urgency","source","impactAreaId","suggestedActions","additionalInformation","type","companyId","isRemoved","dueDate","status","assigneeUserId","externalSource","actionCount","planCount","tags"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","pageSize","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/api/capa/findings/network/archive":{"get":{"tags":["CAPA Findings"],"description":"Archived CAPA findings list for network","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"count","required":false},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false,"description":"JSON string with filter criteria, e.g., {\"title\": \"specific title\", \"description\": \"description text\", \"urgency\": \"A\", \"source\": \"AI_GENERATED\", \"status\": \"OPEN\", \"type\": \"AUDIT\", \"assignee\": \"John Smith\", \"assigneeUserId\": \"user-123\", \"impactAreaId\": \"area-456\", \"dueDateFrom\": \"2024-01-01\", \"dueDateTo\": \"2024-12-31\", \"isOverdue\": true}. The assignee field accepts user names or email addresses for text search, while assigneeUserId is for exact user ID matching."},{"schema":{"type":"string"},"in":"query","name":"auditId","required":false},{"schema":{"type":"string"},"in":"query","name":"capId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"auditId":{"nullable":true,"type":"string"},"title":{"type":"string"},"description":{"nullable":true,"type":"string"},"urgency":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"suggestedActions":{"nullable":true,"type":"string"},"additionalInformation":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"companyName":{"nullable":true,"type":"string"},"isRemoved":{"type":"number"},"dueDate":{"nullable":true,"type":"string","format":"date-time"},"status":{"nullable":true,"type":"string"},"assigneeUserId":{"nullable":true,"type":"string"},"externalSource":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"actionCount":{"type":"number"},"planCount":{"type":"number"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}},"sourceObject":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"auditTypeId":{"nullable":true,"type":"string"},"auditTypeName":{"nullable":true,"type":"string"},"referenceNumber":{"nullable":true,"type":"string"},"auditDate":{"nullable":true,"type":"string","format":"date-time"},"facilityScore":{"nullable":true,"type":"string"}},"required":["id","name","auditTypeId","auditTypeName","referenceNumber","auditDate","facilityScore"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"objectId":{"type":"string"},"version":{"type":"string"},"status":{"type":"string"},"revision":{"type":"string"},"submittedOn":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","objectId","version","status","revision","submittedOn"],"additionalProperties":false},{"type":"object","properties":{},"additionalProperties":false}]},"isLinkedToPlan":{"type":"number"}},"required":["id","auditId","title","description","urgency","source","impactAreaId","suggestedActions","additionalInformation","type","companyId","isRemoved","dueDate","status","assigneeUserId","externalSource","actionCount","planCount","tags"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","pageSize","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/api/capa/findings/":{"post":{"tags":["CAPA Findings"],"description":"Create a new finding","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":4000},"description":{"type":"string"},"companyId":{"type":"string","minLength":1},"type":{"type":"string","enum":["AUDIT","SLCP","FACTORY_VISIT","OTHER"]},"source":{"type":"string","minLength":1},"urgency":{"type":"string","enum":["A","B","C","D","E"]},"impactAreaId":{"type":"string","minLength":1},"tags":{"type":"array","items":{"type":"string"}},"rootCauseAnalysis":{"nullable":true,"type":"string","maxLength":4000},"genderedImplications":{"nullable":true,"type":"string","maxLength":4000}},"required":["title","description","companyId","type","source","urgency","impactAreaId"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"auditId":{"nullable":true,"type":"string"},"title":{"type":"string"},"urgency":{"type":"string"},"source":{"type":"string"},"impactAreaId":{"type":"string"},"createdAt":{"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"createdByCompanyId":{"type":"string"},"type":{"type":"string"},"status":{"type":"string","enum":["TO_DO","IN_PROGRESS","DONE"]},"externalSource":{"nullable":true,"type":"string"},"rootCauseAnalysis":{"nullable":true,"type":"string"},"genderedImplications":{"nullable":true,"type":"string"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"}},"required":["id","title","colorCode"],"additionalProperties":false}}},"required":["id","auditId","title","urgency","source","impactAreaId","createdAt","description","companyId","createdByCompanyId","type","status","externalSource","rootCauseAnalysis","genderedImplications"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/capa/findings/{id}":{"patch":{"tags":["CAPA Findings"],"description":"Update an existing finding","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":4000},"description":{"type":"string"},"urgency":{"type":"string","enum":["A","B","C","D","E"]},"impactAreaId":{"type":"string","minLength":1},"assigneeUserId":{"type":"string"},"dueDate":{"nullable":true,"type":"string"},"rootCauseAnalysis":{"nullable":true,"type":"string","maxLength":4000},"genderedImplications":{"nullable":true,"type":"string","maxLength":4000}}}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"urgency":{"type":"string"},"impactAreaId":{"type":"string"},"assigneeUserId":{"nullable":true,"type":"string"},"dueDate":{"nullable":true,"type":"string"},"rootCauseAnalysis":{"nullable":true,"type":"string"},"genderedImplications":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["TO_DO","IN_PROGRESS","DONE"]}},"required":["id","title","description","urgency","impactAreaId","assigneeUserId","dueDate","rootCauseAnalysis","genderedImplications","status"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/capa/findings/archive":{"post":{"tags":["CAPA Findings"],"description":"Archive multiple findings","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"findingIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["findingIds"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/capa/findings/unarchive":{"post":{"tags":["CAPA Findings"],"description":"Unarchive multiple findings by removing them from the archive table","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"findingIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["findingIds"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/capa/import-actions/":{"post":{"tags":["CAPA"],"description":"Import actions (Corrective and Preventive Actions) from findings","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceType":{"type":"string","minLength":1},"sourceId":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1},"findings":{"minItems":1,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"severity":{"type":"string","enum":["A","B","C","D","E"]},"impactAreaId":{"type":"string"},"impactAreaExtractedName":{"type":"string"},"actions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"status":{"type":"string","enum":["TO_DO","IN_PROGRESS","BLOCKED","IN_REVIEW","CHANGES_REQUESTED","DONE"]},"dueDate":{"type":"string"},"severity":{"type":"string","enum":["A","B","C","D","E"]},"impactAreaId":{"type":"string"},"impactAreaExtractedName":{"type":"string"},"assignee":{"nullable":true,"type":"object","properties":{"id":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1}},"required":["id","companyId"]},"assigneeExtractedName":{"type":"string"},"collaborator":{"nullable":true,"type":"object","properties":{"companyId":{"type":"string","minLength":1}},"required":["companyId"]},"collaboratorExtractedName":{"type":"string"},"reporters":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1}},"required":["userId","companyId"]}}},"required":["title","description","type"]}}},"required":["title","description","actions"]}},"workflowId":{"type":"string","minLength":1},"reviewStage":{"type":"string","enum":["CAP","FINDINGS"]}},"required":["sourceType","sourceId","companyId","findings"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"createdFindings":{"type":"number"},"createdActions":{"type":"number"},"actionIds":{"type":"array","items":{"type":"string"}}},"required":["success","message","createdFindings","createdActions","actionIds"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/capa/link-users":{"post":{"tags":["CAPA"],"description":"Link users as watchers of Corrective Action Plans (CAPs) and Actions (CAs or PAs)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actionId":{"type":"string","minLength":1},"users":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1}},"required":["userId","companyId"]}}},"required":["actionId","users"]}}}},"responses":{}}},"/api/capa/process/":{"post":{"tags":["CAPA"],"description":"Process CAPA (Corrective and Preventive Action) by creating a background job","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"auditFileId":{"type":"string","minLength":1},"capFileId":{"type":"string","minLength":1},"importContext":{"type":"object","properties":{"sourceAuditId":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1},"capId":{"type":"string","minLength":1}}}}}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"auditFileId":{"nullable":true,"type":"string"},"capaFileId":{"nullable":true,"type":"string"},"status":{"type":"string"},"percentage":{"type":"number"},"workflows":{"type":"array","items":{"type":"string"}},"finishedWorkflows":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","auditFileId","capaFileId","status","percentage","workflows","finishedWorkflows","metadata","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/capa/process/cancel":{"delete":{"tags":["CAPA"],"description":"Cancel CAPA workflow by workflow ID","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowId":{"type":"string","minLength":1}},"required":["workflowId"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/capa/unarchive/":{"post":{"tags":["CAPA"],"description":"Unarchive multiple corrective action plans (CAPs)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actionIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["actionIds"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/capa/workflows/{id}":{"get":{"tags":["CAPA"],"description":"Get CAPA workflow status by workflow ID","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"auditFileId":{"nullable":true,"type":"string"},"capaFileId":{"nullable":true,"type":"string"},"status":{"type":"string"},"percentage":{"type":"number"},"workflows":{"type":"array","items":{"type":"string"}},"finishedWorkflows":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","additionalProperties":{}},"auditFile":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileHash":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"fileType":{"nullable":true,"type":"string"},"url":{"type":"string"},"bucketName":{"type":"string"}},"required":["id","name","contentType","fileHash","fileSize","fileType","url","bucketName"],"additionalProperties":false},"capaFile":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileHash":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"fileType":{"nullable":true,"type":"string"},"url":{"type":"string"},"bucketName":{"type":"string"}},"required":["id","name","contentType","fileHash","fileSize","fileType","url","bucketName"],"additionalProperties":false},"stepProgress":{"type":"object","additionalProperties":{"type":"object","properties":{"percent":{"type":"number"},"messageKey":{"type":"string"}},"required":["percent","messageKey"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","auditFileId","capaFileId","status","percentage","workflows","finishedWorkflows","metadata","auditFile","capaFile","stepProgress","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/capa/workflows/{workflowId}/steps":{"post":{"tags":["CAPA"],"description":"Append one or more processing steps to an existing CAPA workflow and enqueue their background jobs","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflows":{"type":"array","items":{"type":"string"}}},"required":["workflows"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"workflowId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"auditFileId":{"nullable":true,"type":"string"},"capaFileId":{"nullable":true,"type":"string"},"status":{"type":"string"},"percentage":{"type":"number"},"workflows":{"type":"array","items":{"type":"string"}},"finishedWorkflows":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","additionalProperties":{}},"auditFile":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileHash":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"fileType":{"nullable":true,"type":"string"},"url":{"type":"string"},"bucketName":{"type":"string"}},"required":["id","name","contentType","fileHash","fileSize","fileType","url","bucketName"],"additionalProperties":false},"capaFile":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileHash":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"fileType":{"nullable":true,"type":"string"},"url":{"type":"string"},"bucketName":{"type":"string"}},"required":["id","name","contentType","fileHash","fileSize","fileType","url","bucketName"],"additionalProperties":false},"stepProgress":{"type":"object","additionalProperties":{"type":"object","properties":{"percent":{"type":"number"},"messageKey":{"type":"string"}},"required":["percent","messageKey"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","auditFileId","capaFileId","status","percentage","workflows","finishedWorkflows","metadata","auditFile","capaFile","stepProgress","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/capa/export":{"post":{"tags":["CAPA"],"description":"Export CAPs, Actions and Findings based on filters provided","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["selected","filtered"]},"selected":{"type":"object","properties":{"entityType":{"type":"array","items":{"type":"string","enum":["CAP","ACTION","FINDING"]}},"entityIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["entityType","entityIds"]},"filters":{"type":"object","properties":{"responsibleCompanyIds":{"type":"array","items":{"type":"string"}},"creationDateOfFinding":{"type":"string"},"sourceType":{"type":"string"},"sourceId":{"type":"string"},"countries":{"type":"array","items":{"type":"string"}},"tierIds":{"type":"array","items":{"type":"string"}},"vendorIds":{"type":"array","items":{"type":"string"}},"actionStatuses":{"type":"array","items":{"type":"string"}}}},"columns":{"type":"object","properties":{"CAP":{"type":"array","items":{"type":"string"}},"FINDING":{"type":"array","items":{"type":"string"}},"ACTION":{"type":"array","items":{"type":"string"}}}}},"required":["type"]}}}},"responses":{}}},"/api/certificate-ai/{fileId}":{"post":{"tags":["Certificate AI"],"description":"Trigger the AI processing workflow for a certificate file (extraction → classification → field extraction)","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"fileId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"fileId":{"type":"string"},"status":{"type":"string"},"percentage":{"type":"number"},"workflows":{"type":"array","items":{"type":"string"}},"finishedWorkflows":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","additionalProperties":{}},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"file":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"url":{"type":"string"}},"required":["id","name","contentType","fileSize","url"],"additionalProperties":false}},"required":["id","fileId","status","percentage","workflows","finishedWorkflows","metadata","createdByUserId","createdByCompanyId","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"fileId":{"type":"string"},"status":{"type":"string"},"percentage":{"type":"number"},"workflows":{"type":"array","items":{"type":"string"}},"finishedWorkflows":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","additionalProperties":{}},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"file":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"url":{"type":"string"}},"required":["id","name","contentType","fileSize","url"],"additionalProperties":false}},"required":["id","fileId","status","percentage","workflows","finishedWorkflows","metadata","createdByUserId","createdByCompanyId","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/certificate-ai/status":{"get":{"tags":["Certificate AI"],"description":"List all certificate AI workflows for the authenticated company","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fileId":{"type":"string"},"status":{"type":"string"},"percentage":{"type":"number"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","fileId","status","percentage","createdAt","updatedAt"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/certificate-ai/{workflowId}":{"get":{"tags":["Certificate AI"],"description":"Get the status of the AI processing workflow for a certificate file","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"workflowId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"fileId":{"type":"string"},"status":{"type":"string"},"percentage":{"type":"number"},"workflows":{"type":"array","items":{"type":"string"}},"finishedWorkflows":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","additionalProperties":{}},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"file":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileSize":{"nullable":true,"type":"number"},"url":{"type":"string"}},"required":["id","name","contentType","fileSize","url"],"additionalProperties":false}},"required":["id","fileId","status","percentage","workflows","finishedWorkflows","metadata","createdByUserId","createdByCompanyId","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/certificate-ai/cancel":{"delete":{"tags":["Certificate AI"],"description":"Cancel a certificate AI workflow","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowId":{"type":"string","minLength":1}},"required":["workflowId"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/claims/":{"post":{"tags":["Claims"],"description":"Adds a new claim in DRAFT/REQUESTED state.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1},"standardId":{"type":"string","minLength":1},"explanation":{"nullable":true,"type":"string"},"expirationDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$"},"issueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$"},"issuedBy":{"nullable":true,"type":"string","maxLength":255},"fileId":{"nullable":true,"type":"string","minLength":1},"documentNumber":{"nullable":true,"type":"string","minLength":1,"maxLength":255},"licenseNumber":{"nullable":true,"type":"string","minLength":1,"maxLength":255},"styleIds":{"type":"array","items":{"type":"string","minLength":1}},"shouldAttachChildren":{"type":"boolean"},"renewedId":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string","enum":["DRAFT","REQUESTED","APPROVED","NOT_VERIFIABLE"]}},"required":["companyId","standardId","expirationDate","issueDate"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"standardId":{"type":"string"},"status":{"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"explanation":{"nullable":true,"type":"string"},"expirationDate":{"nullable":true,"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$"},{"type":"string"}]},"issueDate":{"nullable":true,"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$"},{"type":"string"}]},"issuedBy":{"nullable":true,"type":"string"},"fileId":{"nullable":true,"type":"string"},"fileUrl":{"nullable":true,"type":"string"},"fileType":{"nullable":true,"type":"string"},"fileContentType":{"nullable":true,"type":"string"},"documentNumber":{"nullable":true,"type":"string"},"licenseNumber":{"nullable":true,"type":"string"},"livingWage":{"nullable":true,"type":"string"},"minimumWage":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"logoFileUrl":{"nullable":true,"type":"string"},"isRemoved":{"anyOf":[{"type":"number"},{"type":"boolean"}]},"isArchived":{"anyOf":[{"type":"number"},{"type":"boolean"}]},"isValidWithLatestRules":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"certificateDependencies":{"nullable":true,"type":"object","properties":{"products":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"translations":{"nullable":true,"type":"object","additionalProperties":{}},"providerName":{"nullable":true,"type":"string"},"companyName":{"nullable":true,"type":"string"},"companyOfficialName":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"createdByUserEmail":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"}},"required":["id","companyId","standardId","status","expirationDate","issueDate"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/claims/export":{"post":{"tags":["Claims"],"description":"Export all claims data for the company. The user will receive a notification once the export is ready for download.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"default":[],"type":"array","items":{"type":"string","minLength":1}}}}}}},"responses":{}}},"/api/claims/{id}":{"put":{"tags":["Claims"],"description":"Updates an existing claim. Always resets claim to REQUESTED status.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"explanation":{"nullable":true,"type":"string"},"expirationDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$"},"issueDate":{"nullable":true,"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$"},"issuedBy":{"nullable":true,"type":"string","maxLength":255},"fileId":{"nullable":true,"type":"string","minLength":1},"documentNumber":{"nullable":true,"type":"string","maxLength":255},"licenseNumber":{"nullable":true,"type":"string","maxLength":255},"livingWage":{"nullable":true,"type":"string"},"minimumWage":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"styleIds":{"type":"array","items":{"type":"string","minLength":1}},"shouldAttachChildren":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"standardId":{"type":"string"},"status":{"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"explanation":{"nullable":true,"type":"string"},"expirationDate":{"nullable":true,"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$"},{"type":"string"}]},"issueDate":{"nullable":true,"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$"},{"type":"string"}]},"issuedBy":{"nullable":true,"type":"string"},"fileId":{"nullable":true,"type":"string"},"fileUrl":{"nullable":true,"type":"string"},"fileType":{"nullable":true,"type":"string"},"fileContentType":{"nullable":true,"type":"string"},"documentNumber":{"nullable":true,"type":"string"},"licenseNumber":{"nullable":true,"type":"string"},"livingWage":{"nullable":true,"type":"string"},"minimumWage":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"logoFileUrl":{"nullable":true,"type":"string"},"isRemoved":{"anyOf":[{"type":"number"},{"type":"boolean"}]},"isArchived":{"anyOf":[{"type":"number"},{"type":"boolean"}]},"isValidWithLatestRules":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"certificateDependencies":{"nullable":true,"type":"object","properties":{"products":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"translations":{"nullable":true,"type":"object","additionalProperties":{}},"providerName":{"nullable":true,"type":"string"},"companyName":{"nullable":true,"type":"string"},"companyOfficialName":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"createdByUserEmail":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"}},"required":["id","companyId","standardId","status","expirationDate","issueDate"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/claims/{id}/to-archive":{"put":{"tags":["Claims"],"description":"Archives a claim. The claim must belong to the caller's own company.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"standardId":{"type":"string"},"status":{"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"explanation":{"nullable":true,"type":"string"},"expirationDate":{"nullable":true,"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$"},{"type":"string"}]},"issueDate":{"nullable":true,"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$"},{"type":"string"}]},"issuedBy":{"nullable":true,"type":"string"},"fileId":{"nullable":true,"type":"string"},"fileUrl":{"nullable":true,"type":"string"},"fileType":{"nullable":true,"type":"string"},"fileContentType":{"nullable":true,"type":"string"},"documentNumber":{"nullable":true,"type":"string"},"licenseNumber":{"nullable":true,"type":"string"},"livingWage":{"nullable":true,"type":"string"},"minimumWage":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"logoFileUrl":{"nullable":true,"type":"string"},"isRemoved":{"anyOf":[{"type":"number"},{"type":"boolean"}]},"isArchived":{"anyOf":[{"type":"number"},{"type":"boolean"}]},"isValidWithLatestRules":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"certificateDependencies":{"nullable":true,"type":"object","properties":{"products":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"translations":{"nullable":true,"type":"object","additionalProperties":{}},"providerName":{"nullable":true,"type":"string"},"companyName":{"nullable":true,"type":"string"},"companyOfficialName":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"createdByUserEmail":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"}},"required":["id","companyId","standardId","status","expirationDate","issueDate"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/claims/{id}/list-styles":{"get":{"tags":["Claims"],"description":"Returns all styles associated with a specific claim.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500},"in":"query","name":"limit","required":false,"description":"Number of results per page. The default and maximum vary per endpoint."},{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","required":false,"description":"Page number (1-based). Defaults to 1."},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"$ref":"#/components/schemas/StyleSchema"}}},"required":["meta","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/dashboard-analytics/certification-metrics/list":{"post":{"tags":["Dashboard Analytics/Certification Metrics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"company_id","type":"string","enum":["company_id","issue_date","status"]},"companyId":{"type":"string"},"status":{"type":"string"}},"required":["companyId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"$ref":"#/components/schemas/CertificateMetrics"}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/dashboard-analytics/certification-drilldown/list":{"post":{"tags":["Dashboard Analytics/Certification Drill Down"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"certificateName","type":"string","enum":["certificateName","certificateId","standardIds","companyName","depthLevel","expirationDate","status","documentNumber","issuedAt"]},"companyId":{"type":"string"},"supplierCompanyIds":{"type":"array","items":{"type":"string"}},"collaborationStatusIds":{"type":"array","items":{"type":"string"}},"standardIds":{"type":"array","items":{"type":"string"}},"startDate":{"type":"string"},"endDate":{"type":"string"},"depthLevel":{"type":"number"},"status":{"type":"string"},"expirationDate":{"type":"string"},"expirationStatus":{"type":"string"}},"required":["companyId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"$ref":"#/components/schemas/CertificateDrilldown"}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/dashboard-analytics/audits-metrics/drill-down/list":{"post":{"tags":["Dashboard Analytics/Audits Drill Down"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"auditStandardName","type":"string","enum":["auditStandardName","auditedCompany","auditDate","nextPlannedAuditDate","facilityScore"]},"companyId":{"type":"string"},"supplierCompanyIds":{"type":"array","items":{"type":"string"}},"collaborationStatusIds":{"type":"array","items":{"type":"string"}},"auditStandardIds":{"type":"array","items":{"type":"string"}},"startDate":{"type":"string"},"endDate":{"type":"string"},"nextPlannedAuditDate":{},"countries":{"type":"array","items":{"type":"string"}},"facilityProcesses":{"type":"array","items":{"type":"string"}},"auditTypeIds":{"type":"array","items":{"type":"string"}},"auditTypeImpactAreaId":{"type":"string"},"auditFindingUrgency":{"type":"string"},"upcomingAudits":{"type":"boolean"}},"required":["companyId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"$ref":"#/components/schemas/AuditDrillDownSchema"}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/entity-scan/purchase-orders/company/{companyId}":{"get":{"tags":["entity-screening"],"description":"Get all purchase orders a screened company is part of","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500},"in":"query","name":"limit","required":false,"description":"Number of results per page. The default and maximum vary per endpoint."},{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","required":false,"description":"Page number (1-based). Defaults to 1."},{"schema":{"default":"orderNumber:desc","anyOf":[{"type":"string"},{"type":"object","properties":{"field":{"type":"string"},"direction":{"type":"string"}},"required":["field","direction"]}]},"in":"query","name":"sort","required":false},{"schema":{"type":"string"},"in":"query","name":"orderNumber","required":false},{"schema":{"type":"string"},"in":"query","name":"tags","required":false},{"schema":{"type":"string"},"in":"query","name":"productCode","required":false},{"schema":{"type":"string"},"in":"path","name":"companyId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"purchaseOrderId":{"type":"string"},"agreedDeliveryDate":{"nullable":true,"type":"string"},"purchaseOrderTags":{"nullable":true,"type":"string"},"orderNumber":{"nullable":true,"type":"string"},"products":{"nullable":true,"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"quantity":{"anyOf":[{"type":"number"},{"type":"string"}]},"unit":{"nullable":true,"type":"string"}},"required":["code","quantity"],"additionalProperties":false}}},"required":["purchaseOrderId"],"additionalProperties":false}}},"required":["meta","data"],"additionalProperties":false}}}}}}},"/api/entity-scan/match-results/{matchingId}/validation":{"patch":{"tags":["entity-screening"],"description":"Upsert validation status for an entity screening match result","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["REVALIDATION","FLAGGED","DISMISSED"]}},"required":["status"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"matchingId","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/entity-screening/threshold":{"get":{"tags":["Entity Screening"],"description":"Get matching threshold for the current company","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"companyId":{"type":"string"},"scoreThresholdValue":{"type":"number"},"updatedByCompanyId":{"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"}},"required":["companyId","scoreThresholdValue","updatedByCompanyId","updatedByUserId","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}},"put":{"tags":["Entity Screening"],"description":"Update matching threshold for the current company","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scoreThresholdValue":{"type":"number"}},"required":["scoreThresholdValue"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{},"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/entity-screening/companies/":{"get":{"tags":["entity-screening"],"description":"List entity screening results for mapped companies","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500},"in":"query","name":"limit","required":false,"description":"Number of results per page. The default and maximum vary per endpoint."},{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","required":false,"description":"Page number (1-based). Defaults to 1."},{"schema":{"default":"companyName:desc","anyOf":[{"type":"string"},{"type":"object","properties":{"field":{"type":"string"},"direction":{"type":"string"}},"required":["field","direction"]}]},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":4096},"in":"query","name":"filter","required":false,"description":"JSON string with filter criteria"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"companyName":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"connectionType":{"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"object","properties":{"facilityProcessId":{"nullable":true,"type":"string"},"facilityProcessName":{"nullable":true,"type":"string"}},"required":["facilityProcessId","facilityProcessName"],"additionalProperties":false}},"validationStatus":{"nullable":true,"type":"string"},"entityList":{"nullable":true,"type":"string"},"entityName":{"nullable":true,"type":"string"},"entityId":{"nullable":true,"type":"string"},"kharonEntityId":{"nullable":true,"type":"string"},"matchId":{"nullable":true,"type":"string"},"matchedText":{"nullable":true,"type":"string"},"matchPercentage":{"nullable":true,"type":"number"},"effectiveDate":{"nullable":true,"type":"string"},"relatedCompanyId":{"type":"string"},"ordersCount":{"type":"number"},"supplyChainsCount":{"type":"number"},"revalidationReason":{"nullable":true,"type":"string"},"revalidationChange":{"nullable":true,"type":"object","properties":{"changedFields":{"type":"array","items":{"type":"string"}},"prev":{"type":"object","additionalProperties":{}},"new":{"type":"object","additionalProperties":{}}},"required":["changedFields","prev","new"],"additionalProperties":false}},"required":["companyId","companyName","countryName","country","connectionType","facilityProcesses","validationStatus","entityList","entityName","entityId","kharonEntityId","matchId","matchedText","matchPercentage","effectiveDate","relatedCompanyId","ordersCount","supplyChainsCount","revalidationReason","revalidationChange"],"additionalProperties":false}}},"required":["meta","data"],"additionalProperties":false}}}}}}},"/api/entity-screening/matches/validate":{"put":{"tags":["Entity Screening"],"description":"Batch validate entity screening match results as flagged or dismissed","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"flaggedIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":36}},"dismissedIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":36}}},"required":["flaggedIds","dismissedIds"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/entity-tags/":{"get":{"tags":["Entity Tags"],"description":"Entity tags list for my company","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"count","required":false},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false,"description":"JSON string with filter criteria, e.g., {\"title\": \"tag title\", \"description\": \"tag description\"}. The title and description fields support partial text search."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"},"description":{"nullable":true,"type":"string"},"createdAt":{"type":"string","format":"date-time"},"createdByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"companyId":{"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"}},"required":["id","title","colorCode","description","createdAt","createdByUserId","createdByCompanyId","companyId"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","pageSize","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}},"post":{"tags":["Entity Tags"],"description":"Create a new entity tag","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":100},"colorCode":{"type":"string","minLength":1},"description":{"type":"string","maxLength":255}},"required":["title","colorCode"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"},"description":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"createdByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"companyId":{"type":"string"}},"required":["id","title","colorCode","description","createdAt","createdByUserId","createdByCompanyId","companyId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/entity-tags/{id}":{"patch":{"tags":["Entity Tags"],"description":"Update an existing entity tag","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":100},"colorCode":{"type":"string","minLength":1},"description":{"type":"string","maxLength":255}},"required":["title","colorCode"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"colorCode":{"type":"string"},"description":{"nullable":true,"type":"string"},"updatedAt":{"type":"string"},"updatedByUserId":{"type":"string"},"updatedByCompanyId":{"type":"string"},"companyId":{"type":"string"}},"required":["id","title","colorCode","description","updatedAt","updatedByUserId","updatedByCompanyId","companyId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}},"delete":{"tags":["Entity Tags"],"description":"Delete an entity tag","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/entity-tags/link/":{"post":{"tags":["Entity Tags Links"],"description":"Link entities with entity tags","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entityType":{"type":"string","minLength":1},"entityId":{"type":"string","minLength":1},"tagIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["entityType","entityId","tagIds"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"linkedCount":{"type":"number"}},"required":["success","message","linkedCount"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/files/ai-processing-jobs/create":{"post":{"tags":["Files"],"description":"Create AI processing jobs for multiple files (maximum 10 files per request)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileIds":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1}},"jobType":{"default":"EXTRACTION","type":"string","enum":["EXTRACTION","CLASSIFICATION","FIELD_EXTRACTION"]},"desiredFields":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string"},"fieldExplanation":{"type":"string"}},"required":["fieldName","fieldExplanation"]}}},"required":["fileIds"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/files/ai-processing-jobs/list":{"post":{"tags":["Files"],"description":"List AI processing jobs for the current company","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":15},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"created_at","type":"string","enum":["created_at","job_type"]},"fileId":{"type":"string","minLength":1},"jobType":{"type":"string"}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1},"jobType":{"type":"string","minLength":1},"input":{"nullable":true,"type":"string"},"result":{"nullable":true},"provider":{"nullable":true,"type":"string"},"model":{"nullable":true,"type":"string"},"inputTokens":{"nullable":true,"type":"number"},"outputTokens":{"nullable":true,"type":"number"},"totalTokens":{"nullable":true,"type":"number"},"completedInMs":{"nullable":true,"type":"number"},"createdAt":{"type":"string","format":"date-time"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"queueJobProcessor":{"nullable":true,"type":"object","properties":{"id":{"nullable":true,"type":"string"},"jobId":{"nullable":true,"type":"string"},"processorNamespace":{"nullable":true,"type":"string"},"status":{"type":"string"},"priority":{"type":"number"},"scheduledAt":{"nullable":true,"type":"number"},"processedAt":{"nullable":true,"type":"number"},"processingStartedAt":{"nullable":true,"type":"number"},"attempts":{"type":"number"},"maxAttempts":{"type":"number"},"error":{"nullable":true,"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","jobId","processorNamespace","status","priority","scheduledAt","attempts","maxAttempts","createdAt"],"additionalProperties":false}},"required":["id","fileId","jobType","input","result","provider","model","inputTokens","outputTokens","totalTokens","completedInMs","createdAt","createdByCompanyId","createdByUserId","createdByApiKeyId"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/files/drop-box/classify":{"post":{"tags":["Files"],"description":"Enqueue fast first-pages classification (Reducto + Latitude `Dropbox/prompt`) for each file. Maximum 10 files per request.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileIds":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1}}},"required":["fileIds"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"enqueued":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string"},"aiProcessingJobId":{"type":"string"}},"required":["fileId","aiProcessingJobId"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string"},"reason":{"type":"string"}},"required":["fileId","reason"],"additionalProperties":false}}},"required":["enqueued","failed"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/files/drop-box/classify/results":{"post":{"tags":["Files"],"description":"Fetch the latest fast-classification result for each of the given fileIds. Maximum 10 files per request.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileIds":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1}}},"required":["fileIds"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string"},"aiProcessingJobId":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["pending","processing","completed","failed"]},"classification":{"nullable":true,"type":"object","properties":{"type":{"type":"string","enum":["AUDIT","CERTIFICATE","CAP","DOCUMENT","OTHER"]},"confidence":{"type":"number"},"reasoning":{"type":"string"}},"required":["type","confidence","reasoning"],"additionalProperties":false},"error":{"nullable":true,"type":"string"}},"required":["fileId","aiProcessingJobId","status","classification","error"],"additionalProperties":false}}},"required":["results"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/files/drop-box/accept":{"post":{"tags":["Files"],"description":"Accept drop-box classifications and kick off the corresponding AI workflow per file. Maximum 10 files per request.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"files":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string","minLength":1},"acceptedType":{"type":"string","enum":["AUDIT","CERTIFICATE","CAP","DOCUMENT","OTHER"]}},"required":["fileId","acceptedType"]}}},"required":["files"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"accepted":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string"},"acceptedType":{"type":"string","enum":["AUDIT","CERTIFICATE","CAP","DOCUMENT","OTHER"]},"workflowId":{"nullable":true,"type":"string"}},"required":["fileId","acceptedType","workflowId"],"additionalProperties":false}},"skipped":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string"},"reason":{"type":"string"}},"required":["fileId","reason"],"additionalProperties":false}}},"required":["accepted","skipped"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/slcp/assessments/":{"get":{"tags":["SLCP Assessments"],"description":"SLCP assessment list","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Number of results per page. The default and maximum vary per endpoint."},{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","required":false,"description":"Page number (1-based). Defaults to 1."},{"schema":{"type":"string"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"type":"string"},"in":"query","name":"companyProfile","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"objectId":{"type":"string"},"companyId":{"type":"string"},"facilityId":{"type":"string"},"status":{"type":"string"},"revision":{"type":"string"},"version":{"type":"string"},"object":{},"notes":{},"firstVrcOn":{"nullable":true,"type":"string","format":"date-time"},"startedOn":{"type":"string","format":"date-time"},"submittedOn":{"nullable":true,"type":"string","format":"date-time"},"selectedVerifier":{},"history":{"type":"array","items":{}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"sharedBy":{"type":"string"},"sharedStatus":{"type":"string","enum":["REQUESTED","SHARED"]}},"required":["id","objectId","companyId","facilityId","status","revision","version","object","notes","firstVrcOn","startedOn","submittedOn","selectedVerifier","sharedBy","sharedStatus"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"objectId":{"type":"string"},"companyId":{"type":"string"},"facilityId":{"type":"string"},"status":{"type":"string"},"revision":{"type":"string"},"version":{"type":"string"},"object":{},"notes":{},"firstVrcOn":{"nullable":true,"type":"string","format":"date-time"},"startedOn":{"type":"string","format":"date-time"},"submittedOn":{"nullable":true,"type":"string","format":"date-time"},"selectedVerifier":{},"history":{"type":"array","items":{}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","objectId","companyId","facilityId","status","revision","version","object","notes","firstVrcOn","startedOn","submittedOn","selectedVerifier"],"additionalProperties":false}]}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","pageSize","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}}}}},"/api/slcp/assessments/{id}/shares/":{"get":{"tags":["slcps"],"description":"Get assessment shares with pagination","parameters":[{"schema":{"type":"string"},"in":"query","name":"shared","required":false},{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"rowsPerPage","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"name":{"type":"string"},"facilityProcesses":{"type":"array","items":{"type":"string"}},"country":{"nullable":true,"type":"string"},"count":{"type":"number"}},"required":["companyId","name","facilityProcesses","country"],"additionalProperties":false}}},"required":["meta","data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"post":{"tags":["slcps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["companyIds"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{}}},"/api/slcp/assessments/{id}/suggested-capas/":{"post":{"tags":["SLCP/Assessments/SuggestedCAPAs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"page":{"default":1,"type":"number","minimum":1},"limit":{"default":20,"type":"number","minimum":1,"maximum":100},"filters":{"type":"object","properties":{"impactAreaId":{"type":"string"},"findingType":{"type":"string"}}}}}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"type":{"type":"string","minLength":1},"impactAreaId":{"type":"string"},"linkedQuestion":{"type":"string"},"auditFindingId":{"type":"string"},"findingType":{"type":"string"}},"required":["title","description","type","impactAreaId","linkedQuestion","auditFindingId","findingType"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/slcp/assessments/archive/":{"post":{"tags":["slcps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assessmentIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["assessmentIds"]}}}},"responses":{}},"delete":{"tags":["slcps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assessmentIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["assessmentIds"]}}}},"responses":{}}},"/api/slcp/assessments/missing-access-request/":{"post":{"tags":["slcps"],"description":"Request access when SLCP assessment is missing - notifies companies to create assessment","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["companyIds"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"requestingCompanyId":{"type":"string"},"requestingCompanyName":{"type":"string"},"totalRequested":{"type":"number"},"successfulNotifications":{"type":"number"},"failedNotifications":{"type":"number"},"results":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"status":{"type":"string","enum":["notification_sent"]},"message":{"type":"string"}},"required":["companyId","status","message"],"additionalProperties":false}}},"required":["requestingCompanyId","requestingCompanyName","totalRequested","successfulNotifications","failedNotifications","results"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/slcp/assessments/requests/{id}":{"get":{"tags":["slcps"],"description":"Get assessment requests with pagination","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"rowsPerPage","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"name":{"type":"string"},"facilityProcesses":{"type":"array","items":{"type":"string"}},"country":{"nullable":true,"type":"string"},"count":{"type":"number"}},"required":["companyId","name","facilityProcesses","country"],"additionalProperties":false}}},"required":["meta","data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/slcp/assessments/requests/":{"post":{"tags":["slcps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assessment_id":{"type":"string","minLength":1}},"required":["assessment_id"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"assessmentId":{"type":"string"},"companyId":{"type":"string"},"sharedBy":{"type":"string"},"status":{"type":"string","enum":["REQUESTED","SHARED"]}},"required":["assessmentId","companyId","sharedBy","status"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/slcp/assessments/network-list/":{"post":{"tags":["SLCP"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":100},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"filter":{"type":"object","properties":{"companyName":{"type":"string"},"companyId":{"nullable":true,"type":"string"},"facilityProcess":{"type":"array","items":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"assessmentId":{"nullable":true,"type":"string"},"objectId":{"nullable":true,"type":"string"},"lastRequestDate":{"nullable":true,"type":"string","format":"date-time"},"lastSharedDate":{"nullable":true,"type":"string","format":"date-time"},"companyName":{"type":"string"},"requestStatus":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"count":{"nullable":true,"type":"number"}},"required":["companyId","assessmentId","objectId","lastRequestDate","lastSharedDate","companyName","requestStatus","facilityProcesses","count"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/slcp/facilities/eligibility/":{"post":{"tags":["slcps"],"description":"Check SLCP facility eligibility against the SLCP Gateway. On an eligible result the facility ID is persisted into the OTHER_IDS company profile.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"facilityId":{"type":"string","minLength":1}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"eligible":{"type":"boolean"},"facilityId":{"type":"string"}},"required":["eligible","facilityId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/{entityName}/{id}/badges":{"get":{"tags":["Products/Badges"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"entityName","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"badge":{"type":"object","properties":{"id":{"type":"string"},"category":{"nullable":true,"type":"string"},"name":{"type":"string"},"nameDe":{"nullable":true,"type":"string"},"nameEs":{"nullable":true,"type":"string"},"nameFr":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"descriptionDe":{"nullable":true,"type":"string"},"descriptionEs":{"nullable":true,"type":"string"},"descriptionFr":{"nullable":true,"type":"string"},"imageFileUrl":{"nullable":true,"type":"string"},"standardId":{"nullable":true,"type":"string"},"translations":{"type":"object","additionalProperties":{}}},"required":["id","category","name","description","imageFileUrl"],"additionalProperties":false},"proofs":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"standardId":{"nullable":true,"type":"string"},"expirationDate":{"nullable":true,"type":"string"},"issuedBy":{"nullable":true,"type":"string"},"issueDate":{"nullable":true,"type":"string"}},"additionalProperties":false}}},"required":["badge","proofs"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/recalculate-badges":{"post":{"tags":["Products/Badges"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"styleId":{"type":"string","minLength":1}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"logs":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"productName":{"type":"string"},"badges":{"type":"array","items":{"type":"string"}}},"required":["productId","productName","badges"],"additionalProperties":false}}},"required":["logs"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"status":{"type":"string"}},"required":["status"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/batches":{"post":{"tags":["Products/Batches"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"code":{"type":"string"},"creationDate":{"type":"string","minLength":1,"maxLength":100},"quantity":{"type":"number","minimum":0},"quantityUnit":{"type":"string","maxLength":100},"modelNumber":{"nullable":true,"type":"string","maxLength":500},"description":{"type":"string","maxLength":4000},"styleId":{"type":"string","minLength":1}},"required":["name","code","creationDate","quantity","styleId"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"creationDate":{"type":"string"},"quantity":{"type":"number"},"quantityUnit":{"nullable":true,"type":"string"},"modelNumber":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"styleId":{"type":"string"},"entityData":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"type":"string"},"name":{"type":"string"},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"styleLevelId":{"type":"string"},"styleTypeId":{"type":"string"},"brands":{"nullable":true,"type":"array","items":{"type":"string"}},"departments":{"nullable":true,"type":"array","items":{"type":"string"}},"collections":{"nullable":true,"type":"array","items":{"type":"string"}},"claimIntentions":{"nullable":true,"type":"array","items":{"type":"string"}},"customProperties":{"nullable":true,"type":"string"},"suppliers":{"nullable":true,"type":"array","items":{"type":"string"}},"vendors":{"nullable":true,"type":"array","items":{"type":"string"}},"isComponent":{"nullable":true,"type":"boolean"},"createdAt":{"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"mainSupplier":{"nullable":true,"type":"string"},"imagesFileIds":{"nullable":true,"type":"array","items":{"type":"string"}},"color":{"nullable":true,"type":"string"},"dimension":{"nullable":true,"type":"string"},"styleId":{"nullable":true,"type":"string"},"overriddenFlag":{"nullable":true,"type":"array","items":{"type":"string"}},"variantId":{"nullable":true,"type":"string"}},"required":["id","name","codes","styleLevelId","styleTypeId"],"additionalProperties":{}},"bomData":{"nullable":true,"type":"object","properties":{"header":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"effectiveStartDate":{"type":"string"},"effectiveEndDate":{"nullable":true,"type":"string"},"version":{"type":"number"}},"required":["id","name","effectiveStartDate","effectiveEndDate","version"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"placementId":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"quantityUnit":{"nullable":true,"type":"string"},"weight":{"nullable":true,"type":"number"},"weightUnit":{"nullable":true,"type":"string"},"countryOfOrigin":{"nullable":true,"type":"string","minLength":2,"maxLength":2},"styleId":{"type":"string"},"isMainComponent":{"type":"boolean"},"suppliers":{"nullable":true,"type":"array","items":{"type":"string"}},"mainSupplier":{"nullable":true,"type":"string"},"entity":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"type":"string"},"name":{"type":"string"},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"description":{"nullable":true,"type":"string"}},"required":["id","forCompanyId","name","codes","description"],"additionalProperties":false},"placement":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"forCompanyId":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","value","forCompanyId","createdAt","updatedAt"],"additionalProperties":false}},"required":["id","placementId","quantity","quantityUnit","weight","weightUnit","countryOfOrigin","styleId","isMainComponent"],"additionalProperties":false}}},"required":["header","lines"],"additionalProperties":false},"materialData":{"nullable":true,"type":"object","properties":{"header":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"}},"required":["id","name","description"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rawMaterialId":{"type":"string"},"percentage":{"type":"number"},"weights":{"nullable":true,"type":"number"},"weightUnit":{"nullable":true,"type":"string"},"parentId":{"nullable":true,"type":"string"},"hierarchy":{"nullable":true,"type":"number"},"position":{"nullable":true,"type":"number"},"countriesOfOrigin":{"nullable":true,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}}},"required":["id","rawMaterialId","percentage","weights","weightUnit","parentId","hierarchy","position","countriesOfOrigin"],"additionalProperties":false}}},"required":["header","lines"],"additionalProperties":false},"forCompanyId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"}},"required":["id","name","code","creationDate","quantity","quantityUnit","description","styleId","entityData","bomData","materialData","forCompanyId","createdAt","createdByUserId","createdByCompanyId","updatedAt","updatedByUserId","updatedByCompanyId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/batches/list":{"post":{"tags":["Products/Batches"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"createdAt","type":"string","enum":["createdAt","updatedAt","name","code","creationDate","quantity","quantityUnit","modelNumber","styleId"]},"ids":{"type":"array","items":{"type":"string","minLength":1}},"name":{"type":"string"},"code":{"type":"string"},"styleId":{"type":"string","minLength":1},"modelNumber":{"type":"string"},"quantityUnit":{"type":"string"},"include":{"type":"array","items":{"type":"string","enum":["parentStyle"]}}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/batches/{id}":{"put":{"tags":["Products/Batches"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"code":{"type":"string"},"creationDate":{"type":"string","minLength":1,"maxLength":100},"quantity":{"type":"number","minimum":0},"quantityUnit":{"type":"string","maxLength":100},"modelNumber":{"nullable":true,"type":"string","maxLength":500},"description":{"type":"string","maxLength":4000}},"required":["name","code","creationDate","quantity"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"creationDate":{"type":"string"},"quantity":{"type":"number"},"quantityUnit":{"nullable":true,"type":"string"},"modelNumber":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"styleId":{"type":"string"},"entityData":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"type":"string"},"name":{"type":"string"},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"styleLevelId":{"type":"string"},"styleTypeId":{"type":"string"},"brands":{"nullable":true,"type":"array","items":{"type":"string"}},"departments":{"nullable":true,"type":"array","items":{"type":"string"}},"collections":{"nullable":true,"type":"array","items":{"type":"string"}},"claimIntentions":{"nullable":true,"type":"array","items":{"type":"string"}},"customProperties":{"nullable":true,"type":"string"},"suppliers":{"nullable":true,"type":"array","items":{"type":"string"}},"vendors":{"nullable":true,"type":"array","items":{"type":"string"}},"isComponent":{"nullable":true,"type":"boolean"},"createdAt":{"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"mainSupplier":{"nullable":true,"type":"string"},"imagesFileIds":{"nullable":true,"type":"array","items":{"type":"string"}},"color":{"nullable":true,"type":"string"},"dimension":{"nullable":true,"type":"string"},"styleId":{"nullable":true,"type":"string"},"overriddenFlag":{"nullable":true,"type":"array","items":{"type":"string"}},"variantId":{"nullable":true,"type":"string"}},"required":["id","name","codes","styleLevelId","styleTypeId"],"additionalProperties":{}},"bomData":{"nullable":true,"type":"object","properties":{"header":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"effectiveStartDate":{"type":"string"},"effectiveEndDate":{"nullable":true,"type":"string"},"version":{"type":"number"}},"required":["id","name","effectiveStartDate","effectiveEndDate","version"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"placementId":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"quantityUnit":{"nullable":true,"type":"string"},"weight":{"nullable":true,"type":"number"},"weightUnit":{"nullable":true,"type":"string"},"countryOfOrigin":{"nullable":true,"type":"string","minLength":2,"maxLength":2},"styleId":{"type":"string"},"isMainComponent":{"type":"boolean"},"suppliers":{"nullable":true,"type":"array","items":{"type":"string"}},"mainSupplier":{"nullable":true,"type":"string"},"entity":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"type":"string"},"name":{"type":"string"},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"description":{"nullable":true,"type":"string"}},"required":["id","forCompanyId","name","codes","description"],"additionalProperties":false},"placement":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"forCompanyId":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","value","forCompanyId","createdAt","updatedAt"],"additionalProperties":false}},"required":["id","placementId","quantity","quantityUnit","weight","weightUnit","countryOfOrigin","styleId","isMainComponent"],"additionalProperties":false}}},"required":["header","lines"],"additionalProperties":false},"materialData":{"nullable":true,"type":"object","properties":{"header":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"}},"required":["id","name","description"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rawMaterialId":{"type":"string"},"percentage":{"type":"number"},"weights":{"nullable":true,"type":"number"},"weightUnit":{"nullable":true,"type":"string"},"parentId":{"nullable":true,"type":"string"},"hierarchy":{"nullable":true,"type":"number"},"position":{"nullable":true,"type":"number"},"countriesOfOrigin":{"nullable":true,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}}},"required":["id","rawMaterialId","percentage","weights","weightUnit","parentId","hierarchy","position","countriesOfOrigin"],"additionalProperties":false}}},"required":["header","lines"],"additionalProperties":false},"forCompanyId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"}},"required":["id","name","code","creationDate","quantity","quantityUnit","description","styleId","entityData","bomData","materialData","forCompanyId","createdAt","createdByUserId","createdByCompanyId","updatedAt","updatedByUserId","updatedByCompanyId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}},"get":{"tags":["Products/Batches"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"creationDate":{"type":"string"},"quantity":{"type":"number"},"quantityUnit":{"nullable":true,"type":"string"},"modelNumber":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"styleId":{"type":"string"},"entityData":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"type":"string"},"name":{"type":"string"},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"styleLevelId":{"type":"string"},"styleTypeId":{"type":"string"},"brands":{"nullable":true,"type":"array","items":{"type":"string"}},"departments":{"nullable":true,"type":"array","items":{"type":"string"}},"collections":{"nullable":true,"type":"array","items":{"type":"string"}},"claimIntentions":{"nullable":true,"type":"array","items":{"type":"string"}},"customProperties":{"nullable":true,"type":"string"},"suppliers":{"nullable":true,"type":"array","items":{"type":"string"}},"vendors":{"nullable":true,"type":"array","items":{"type":"string"}},"isComponent":{"nullable":true,"type":"boolean"},"createdAt":{"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"mainSupplier":{"nullable":true,"type":"string"},"imagesFileIds":{"nullable":true,"type":"array","items":{"type":"string"}},"color":{"nullable":true,"type":"string"},"dimension":{"nullable":true,"type":"string"},"styleId":{"nullable":true,"type":"string"},"overriddenFlag":{"nullable":true,"type":"array","items":{"type":"string"}},"variantId":{"nullable":true,"type":"string"}},"required":["id","name","codes","styleLevelId","styleTypeId"],"additionalProperties":{}},"bomData":{"nullable":true,"type":"object","properties":{"header":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"effectiveStartDate":{"type":"string"},"effectiveEndDate":{"nullable":true,"type":"string"},"version":{"type":"number"}},"required":["id","name","effectiveStartDate","effectiveEndDate","version"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"placementId":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"quantityUnit":{"nullable":true,"type":"string"},"weight":{"nullable":true,"type":"number"},"weightUnit":{"nullable":true,"type":"string"},"countryOfOrigin":{"nullable":true,"type":"string","minLength":2,"maxLength":2},"styleId":{"type":"string"},"isMainComponent":{"type":"boolean"},"suppliers":{"nullable":true,"type":"array","items":{"type":"string"}},"mainSupplier":{"nullable":true,"type":"string"},"entity":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"type":"string"},"name":{"type":"string"},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"description":{"nullable":true,"type":"string"}},"required":["id","forCompanyId","name","codes","description"],"additionalProperties":false},"placement":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"forCompanyId":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","value","forCompanyId","createdAt","updatedAt"],"additionalProperties":false}},"required":["id","placementId","quantity","quantityUnit","weight","weightUnit","countryOfOrigin","styleId","isMainComponent"],"additionalProperties":false}}},"required":["header","lines"],"additionalProperties":false},"materialData":{"nullable":true,"type":"object","properties":{"header":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"}},"required":["id","name","description"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rawMaterialId":{"type":"string"},"percentage":{"type":"number"},"weights":{"nullable":true,"type":"number"},"weightUnit":{"nullable":true,"type":"string"},"parentId":{"nullable":true,"type":"string"},"hierarchy":{"nullable":true,"type":"number"},"position":{"nullable":true,"type":"number"},"countriesOfOrigin":{"nullable":true,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}}},"required":["id","rawMaterialId","percentage","weights","weightUnit","parentId","hierarchy","position","countriesOfOrigin"],"additionalProperties":false}}},"required":["header","lines"],"additionalProperties":false},"forCompanyId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"}},"required":["id","name","code","creationDate","quantity","quantityUnit","description","styleId","entityData","bomData","materialData","forCompanyId","createdAt","createdByUserId","createdByCompanyId","updatedAt","updatedByUserId","updatedByCompanyId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}},"delete":{"tags":["Products/Batches"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/batches/{id}/bom":{"put":{"tags":["Products/Batches"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"header":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"effectiveStartDate":{"type":"string","minLength":1},"effectiveEndDate":{"nullable":true,"type":"string"},"version":{"type":"number","minimum":1}},"required":["id","name","effectiveStartDate","effectiveEndDate","version"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"nullable":true,"type":"string"},"placementId":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number","minimum":0},"quantityUnit":{"nullable":true,"type":"string","enum":["PIECES","PAIR","PERCENTAGE","DENIER","JUTE","ENGLISH_COUNT","METRIC_COUNT","WORSTED_COUNT","TEX","GRAM","KILOGRAM","LITRE","METRIC_TON","MILLIMETRE","CENTIMETRE","METRE","SQUARE_CENTIMETRE","SQUARE_METRE"]},"weight":{"nullable":true,"type":"number","minimum":0},"weightUnit":{"nullable":true,"type":"string","enum":["GRAM","GRAM_PER_SQUARE_METER","GRAM_PER_SQUARE_FOOT","GRAM_PER_SQUARE_YARD","OUNCE_PER_SQUARE_YARD","MILLIGRAM","KILOGRAM","METRIC_TON","POUNDS","SHORT_TON","LONG_TON","HUNDREDWEIGHT","SHORT_HUNDREDWEIGHT","LONG_HUNDREDWEIGHT","OUNCE","DRAM","GRAIN","PENNYWEIGHT","SCRUPLE","STONE"]},"countryOfOrigin":{"nullable":true,"type":"string","minLength":2,"maxLength":2},"suppliers":{"nullable":true,"type":"string"},"mainSupplier":{"nullable":true,"type":"string"},"styleId":{"type":"string","minLength":1},"isMainComponent":{"type":"boolean"}},"required":["placementId","styleId"]}}},"required":["header","lines"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"creationDate":{"type":"string"},"quantity":{"type":"number"},"quantityUnit":{"nullable":true,"type":"string"},"modelNumber":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"styleId":{"type":"string"},"entityData":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"type":"string"},"name":{"type":"string"},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"styleLevelId":{"type":"string"},"styleTypeId":{"type":"string"},"brands":{"nullable":true,"type":"array","items":{"type":"string"}},"departments":{"nullable":true,"type":"array","items":{"type":"string"}},"collections":{"nullable":true,"type":"array","items":{"type":"string"}},"claimIntentions":{"nullable":true,"type":"array","items":{"type":"string"}},"customProperties":{"nullable":true,"type":"string"},"suppliers":{"nullable":true,"type":"array","items":{"type":"string"}},"vendors":{"nullable":true,"type":"array","items":{"type":"string"}},"isComponent":{"nullable":true,"type":"boolean"},"createdAt":{"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"mainSupplier":{"nullable":true,"type":"string"},"imagesFileIds":{"nullable":true,"type":"array","items":{"type":"string"}},"color":{"nullable":true,"type":"string"},"dimension":{"nullable":true,"type":"string"},"styleId":{"nullable":true,"type":"string"},"overriddenFlag":{"nullable":true,"type":"array","items":{"type":"string"}},"variantId":{"nullable":true,"type":"string"}},"required":["id","name","codes","styleLevelId","styleTypeId"],"additionalProperties":{}},"bomData":{"nullable":true,"type":"object","properties":{"header":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"effectiveStartDate":{"type":"string"},"effectiveEndDate":{"nullable":true,"type":"string"},"version":{"type":"number"}},"required":["id","name","effectiveStartDate","effectiveEndDate","version"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"placementId":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"quantityUnit":{"nullable":true,"type":"string"},"weight":{"nullable":true,"type":"number"},"weightUnit":{"nullable":true,"type":"string"},"countryOfOrigin":{"nullable":true,"type":"string","minLength":2,"maxLength":2},"styleId":{"type":"string"},"isMainComponent":{"type":"boolean"},"suppliers":{"nullable":true,"type":"array","items":{"type":"string"}},"mainSupplier":{"nullable":true,"type":"string"},"entity":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"type":"string"},"name":{"type":"string"},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"description":{"nullable":true,"type":"string"}},"required":["id","forCompanyId","name","codes","description"],"additionalProperties":false},"placement":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"forCompanyId":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","value","forCompanyId","createdAt","updatedAt"],"additionalProperties":false}},"required":["id","placementId","quantity","quantityUnit","weight","weightUnit","countryOfOrigin","styleId","isMainComponent"],"additionalProperties":false}}},"required":["header","lines"],"additionalProperties":false},"materialData":{"nullable":true,"type":"object","properties":{"header":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"}},"required":["id","name","description"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rawMaterialId":{"type":"string"},"percentage":{"type":"number"},"weights":{"nullable":true,"type":"number"},"weightUnit":{"nullable":true,"type":"string"},"parentId":{"nullable":true,"type":"string"},"hierarchy":{"nullable":true,"type":"number"},"position":{"nullable":true,"type":"number"},"countriesOfOrigin":{"nullable":true,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}}},"required":["id","rawMaterialId","percentage","weights","weightUnit","parentId","hierarchy","position","countriesOfOrigin"],"additionalProperties":false}}},"required":["header","lines"],"additionalProperties":false},"forCompanyId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"}},"required":["id","name","code","creationDate","quantity","quantityUnit","description","styleId","entityData","bomData","materialData","forCompanyId","createdAt","createdByUserId","createdByCompanyId","updatedAt","updatedByUserId","updatedByCompanyId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/batches/{id}/entity":{"put":{"tags":["Products/Batches"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"codes":{"minItems":1,"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"]}},"description":{"nullable":true,"type":"string","maxLength":1000},"customProperties":{"nullable":true,"type":"string"},"mainSupplier":{"nullable":true,"type":"string"},"styleLevelId":{"nullable":true,"type":"string"},"styleTypeId":{"nullable":true,"type":"string"},"brands":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"departments":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"seasons":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"collections":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"suppliers":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"vendors":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"claimIntentions":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"imagesFileIds":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"gender":{"nullable":true,"type":"string","maxLength":50},"isComponent":{"type":"boolean"},"color":{"type":"string","minLength":1,"maxLength":255},"dimension":{"nullable":true,"type":"string","minLength":1,"maxLength":255}},"required":["name","codes"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"creationDate":{"type":"string"},"quantity":{"type":"number"},"quantityUnit":{"nullable":true,"type":"string"},"modelNumber":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"styleId":{"type":"string"},"entityData":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"type":"string"},"name":{"type":"string"},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"styleLevelId":{"type":"string"},"styleTypeId":{"type":"string"},"brands":{"nullable":true,"type":"array","items":{"type":"string"}},"departments":{"nullable":true,"type":"array","items":{"type":"string"}},"collections":{"nullable":true,"type":"array","items":{"type":"string"}},"claimIntentions":{"nullable":true,"type":"array","items":{"type":"string"}},"customProperties":{"nullable":true,"type":"string"},"suppliers":{"nullable":true,"type":"array","items":{"type":"string"}},"vendors":{"nullable":true,"type":"array","items":{"type":"string"}},"isComponent":{"nullable":true,"type":"boolean"},"createdAt":{"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"mainSupplier":{"nullable":true,"type":"string"},"imagesFileIds":{"nullable":true,"type":"array","items":{"type":"string"}},"color":{"nullable":true,"type":"string"},"dimension":{"nullable":true,"type":"string"},"styleId":{"nullable":true,"type":"string"},"overriddenFlag":{"nullable":true,"type":"array","items":{"type":"string"}},"variantId":{"nullable":true,"type":"string"}},"required":["id","name","codes","styleLevelId","styleTypeId"],"additionalProperties":{}},"bomData":{"nullable":true,"type":"object","properties":{"header":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"effectiveStartDate":{"type":"string"},"effectiveEndDate":{"nullable":true,"type":"string"},"version":{"type":"number"}},"required":["id","name","effectiveStartDate","effectiveEndDate","version"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"placementId":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"quantityUnit":{"nullable":true,"type":"string"},"weight":{"nullable":true,"type":"number"},"weightUnit":{"nullable":true,"type":"string"},"countryOfOrigin":{"nullable":true,"type":"string","minLength":2,"maxLength":2},"styleId":{"type":"string"},"isMainComponent":{"type":"boolean"},"suppliers":{"nullable":true,"type":"array","items":{"type":"string"}},"mainSupplier":{"nullable":true,"type":"string"},"entity":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"type":"string"},"name":{"type":"string"},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"description":{"nullable":true,"type":"string"}},"required":["id","forCompanyId","name","codes","description"],"additionalProperties":false},"placement":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"forCompanyId":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","value","forCompanyId","createdAt","updatedAt"],"additionalProperties":false}},"required":["id","placementId","quantity","quantityUnit","weight","weightUnit","countryOfOrigin","styleId","isMainComponent"],"additionalProperties":false}}},"required":["header","lines"],"additionalProperties":false},"materialData":{"nullable":true,"type":"object","properties":{"header":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"}},"required":["id","name","description"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rawMaterialId":{"type":"string"},"percentage":{"type":"number"},"weights":{"nullable":true,"type":"number"},"weightUnit":{"nullable":true,"type":"string"},"parentId":{"nullable":true,"type":"string"},"hierarchy":{"nullable":true,"type":"number"},"position":{"nullable":true,"type":"number"},"countriesOfOrigin":{"nullable":true,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}}},"required":["id","rawMaterialId","percentage","weights","weightUnit","parentId","hierarchy","position","countriesOfOrigin"],"additionalProperties":false}}},"required":["header","lines"],"additionalProperties":false},"forCompanyId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"}},"required":["id","name","code","creationDate","quantity","quantityUnit","description","styleId","entityData","bomData","materialData","forCompanyId","createdAt","createdByUserId","createdByCompanyId","updatedAt","updatedByUserId","updatedByCompanyId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/batches/{id}/material":{"put":{"tags":["Products/Batches"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"header":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"description":{"nullable":true,"type":"string"}},"required":["id","name","description"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"rawMaterialId":{"type":"string","minLength":1},"percentage":{"type":"number","minimum":0,"maximum":100},"weights":{"nullable":true,"type":"number","minimum":0},"weightUnit":{"nullable":true,"type":"string"},"parentId":{"nullable":true,"type":"string"},"hierarchy":{"nullable":true,"type":"number","minimum":0},"position":{"nullable":true,"type":"number","minimum":0},"countriesOfOrigin":{"nullable":true,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}}},"required":["id","rawMaterialId","percentage","weights","weightUnit","parentId","hierarchy","position","countriesOfOrigin"]}}},"required":["header","lines"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"creationDate":{"type":"string"},"quantity":{"type":"number"},"quantityUnit":{"nullable":true,"type":"string"},"modelNumber":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"styleId":{"type":"string"},"entityData":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"type":"string"},"name":{"type":"string"},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"styleLevelId":{"type":"string"},"styleTypeId":{"type":"string"},"brands":{"nullable":true,"type":"array","items":{"type":"string"}},"departments":{"nullable":true,"type":"array","items":{"type":"string"}},"collections":{"nullable":true,"type":"array","items":{"type":"string"}},"claimIntentions":{"nullable":true,"type":"array","items":{"type":"string"}},"customProperties":{"nullable":true,"type":"string"},"suppliers":{"nullable":true,"type":"array","items":{"type":"string"}},"vendors":{"nullable":true,"type":"array","items":{"type":"string"}},"isComponent":{"nullable":true,"type":"boolean"},"createdAt":{"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"mainSupplier":{"nullable":true,"type":"string"},"imagesFileIds":{"nullable":true,"type":"array","items":{"type":"string"}},"color":{"nullable":true,"type":"string"},"dimension":{"nullable":true,"type":"string"},"styleId":{"nullable":true,"type":"string"},"overriddenFlag":{"nullable":true,"type":"array","items":{"type":"string"}},"variantId":{"nullable":true,"type":"string"}},"required":["id","name","codes","styleLevelId","styleTypeId"],"additionalProperties":{}},"bomData":{"nullable":true,"type":"object","properties":{"header":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"effectiveStartDate":{"type":"string"},"effectiveEndDate":{"nullable":true,"type":"string"},"version":{"type":"number"}},"required":["id","name","effectiveStartDate","effectiveEndDate","version"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"placementId":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"quantityUnit":{"nullable":true,"type":"string"},"weight":{"nullable":true,"type":"number"},"weightUnit":{"nullable":true,"type":"string"},"countryOfOrigin":{"nullable":true,"type":"string","minLength":2,"maxLength":2},"styleId":{"type":"string"},"isMainComponent":{"type":"boolean"},"suppliers":{"nullable":true,"type":"array","items":{"type":"string"}},"mainSupplier":{"nullable":true,"type":"string"},"entity":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"type":"string"},"name":{"type":"string"},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"description":{"nullable":true,"type":"string"}},"required":["id","forCompanyId","name","codes","description"],"additionalProperties":false},"placement":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"forCompanyId":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","value","forCompanyId","createdAt","updatedAt"],"additionalProperties":false}},"required":["id","placementId","quantity","quantityUnit","weight","weightUnit","countryOfOrigin","styleId","isMainComponent"],"additionalProperties":false}}},"required":["header","lines"],"additionalProperties":false},"materialData":{"nullable":true,"type":"object","properties":{"header":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"}},"required":["id","name","description"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rawMaterialId":{"type":"string"},"percentage":{"type":"number"},"weights":{"nullable":true,"type":"number"},"weightUnit":{"nullable":true,"type":"string"},"parentId":{"nullable":true,"type":"string"},"hierarchy":{"nullable":true,"type":"number"},"position":{"nullable":true,"type":"number"},"countriesOfOrigin":{"nullable":true,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}}},"required":["id","rawMaterialId","percentage","weights","weightUnit","parentId","hierarchy","position","countriesOfOrigin"],"additionalProperties":false}}},"required":["header","lines"],"additionalProperties":false},"forCompanyId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"}},"required":["id","name","code","creationDate","quantity","quantityUnit","description","styleId","entityData","bomData","materialData","forCompanyId","createdAt","createdByUserId","createdByCompanyId","updatedAt","updatedByUserId","updatedByCompanyId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/exports/{id}":{"get":{"tags":["Products/Exports"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"Export ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"exportType":{"type":"string"},"status":{"type":"string","enum":["pending","scheduled","processing","completed","failed"]},"fileUrl":{"nullable":true,"type":"string"},"fileName":{"nullable":true,"type":"string"},"totalRows":{"default":0,"type":"number"},"scheduledAt":{"type":"string","format":"date-time"},"completedAt":{"nullable":true,"type":"string","format":"date-time"},"failedAt":{"nullable":true,"type":"string","format":"date-time"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"}},"required":["id","exportType","status","totalRows","scheduledAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"},"message":{"default":"Forbidden","type":"string","minLength":1},"error":{"type":"object","properties":{"message":{"type":"string"},"timestamp":{"type":"string"},"userId":{"type":"string"},"companyId":{"type":"string"},"reqId":{"type":"string"}},"additionalProperties":false}},"required":["success","message","error"],"additionalProperties":false}},"required":["metadata"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"},"message":{"default":"Not found","type":"string","minLength":1},"error":{"type":"object","properties":{"message":{"type":"string"},"timestamp":{"type":"string"},"userId":{"type":"string"},"companyId":{"type":"string"},"reqId":{"type":"string"}},"additionalProperties":false}},"required":["success","message","error"],"additionalProperties":false}},"required":["metadata"],"additionalProperties":false}}}}}}},"/api/bom-headers/":{"post":{"tags":["Products/BOM-Headers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":4000},"link":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"isMainBom":{"default":false,"type":"boolean"}},"required":["styleId"]}},"required":["name","link"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/bom-headers/{id}":{"get":{"tags":["Products/BOM-Headers"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"nullable":true,"type":"string","maxLength":4000},"forCompanyId":{"type":"string","minLength":1},"version":{"nullable":true,"type":"number"},"effectiveStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"effectiveEndDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"isArchived":{"type":"boolean"},"link":{"nullable":true,"type":"object","properties":{"styleId":{"type":"string","minLength":1},"isMainBom":{"default":false,"type":"boolean"},"isOwner":{"default":true,"type":"boolean"}},"required":["styleId","isMainBom","isOwner"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string","maxLength":36},"createdByCompanyId":{"nullable":true,"type":"string","maxLength":36},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"nullable":true,"type":"string","maxLength":36},"updatedByCompanyId":{"nullable":true,"type":"string","maxLength":36}},"required":["id","name","forCompanyId","isArchived","link","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}},"put":{"tags":["Products/BOM-Headers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":4000},"isMainBom":{"type":"boolean"}},"required":["styleId","name","isMainBom"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"nullable":true,"type":"string","maxLength":4000},"forCompanyId":{"type":"string","minLength":1},"version":{"nullable":true,"type":"number"},"effectiveStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"effectiveEndDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"isArchived":{"type":"boolean"},"link":{"nullable":true,"type":"object","properties":{"styleId":{"type":"string","minLength":1},"isMainBom":{"default":false,"type":"boolean"},"isOwner":{"default":true,"type":"boolean"}},"required":["styleId","isMainBom","isOwner"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string","maxLength":36},"createdByCompanyId":{"nullable":true,"type":"string","maxLength":36},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"nullable":true,"type":"string","maxLength":36},"updatedByCompanyId":{"nullable":true,"type":"string","maxLength":36}},"required":["id","name","forCompanyId","isArchived","link","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/bom-headers/list":{"post":{"tags":["Products/BOM-Headers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"createdAt","type":"string","enum":["createdAt","updatedAt","name","version","effectiveStartDate","effectiveEndDate"]},"ids":{"type":"array","items":{"type":"string","minLength":1}},"name":{"type":"string"},"isArchived":{"type":"boolean"},"isMainBom":{"type":"boolean"},"version":{"type":"number"},"styleId":{"type":"string","minLength":1}},"required":["styleId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"nullable":true,"type":"string","maxLength":4000},"forCompanyId":{"type":"string","minLength":1},"version":{"nullable":true,"type":"number"},"effectiveStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"effectiveEndDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"isArchived":{"type":"boolean"},"link":{"nullable":true,"type":"object","properties":{"styleId":{"type":"string","minLength":1},"isMainBom":{"default":false,"type":"boolean"},"isOwner":{"default":true,"type":"boolean"}},"required":["styleId","isMainBom","isOwner"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string","maxLength":36},"createdByCompanyId":{"nullable":true,"type":"string","maxLength":36},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"nullable":true,"type":"string","maxLength":36},"updatedByCompanyId":{"nullable":true,"type":"string","maxLength":36}},"required":["id","name","forCompanyId","isArchived","link","createdAt","updatedAt"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/bom-headers/delete":{"post":{"tags":["Products/BOM-Headers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"bomHeaderIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["styleId","bomHeaderIds"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"deletedHeaders":{"type":"array","items":{"type":"string"}},"deletedLinks":{"type":"array","items":{"type":"string"}},"errors":{"type":"array","items":{"type":"object","properties":{"bomHeaderId":{"type":"string"},"message":{"type":"string"}},"required":["bomHeaderId","message"],"additionalProperties":false}}},"required":["deletedHeaders","deletedLinks","errors"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/bom-import/bulk-import":{"post":{"tags":["Products/BOM-Import"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileId":{"type":"string","minLength":1}},"required":["fileId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"bulkImportId":{"type":"string"},"message":{"type":"string"}},"required":["bulkImportId","message"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"413":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/bom-lines/":{"post":{"tags":["Products/BOM-Lines"],"description":"Add a component to a BOM. The body carries two different products: `entity` is the product whose BOM is being edited (it selects the BOM link to act through, and decides whether the shared BOM is edited or forked for that product first), while `component` is the part being added and is what the line stores. Both accept a Retraced ID or your own externalId. `bomHeaderId` alone is not enough, because one BOM header is linked to a style and every variant/SKU inheriting it, each with its own ownership flag.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"bomHeaderId":{"type":"string","minLength":1},"placementId":{"nullable":true,"type":"string"},"entity":{"type":"object","properties":{"styleId":{"type":"string","minLength":1,"description":"The product whose BOM you are writing to — the owning product, not the part. Accepts the Retraced ID or your own externalId. Decides whether the shared BOM is edited or forked for that product first (copy-on-write)."}},"required":["styleId"],"description":"The product whose BOM you are writing to — the owning product, not the part. Never stored on the line: it picks which of the BOM header's links you act through, which decides whether the shared BOM is edited or a private copy is forked for that product first (copy-on-write). Pass the style to edit the BOM for the whole product family; pass a variant or SKU that only inherits the BOM to fork it for that product alone. `bomHeaderId` cannot replace it: one header is linked to the style and to every variant/SKU inheriting it, each link with its own ownership flag."},"quantity":{"nullable":true,"type":"number","minimum":0},"quantityUnit":{"nullable":true,"description":"Unit of measure for `quantity`. The values actually accepted are the Quantity UoMs configured on the component's style type — read them from `GET /style-types`, or from `type.quantityUnits` on the component. A unit outside that list is rejected with `400 invalid_bom_quantity_unit`. When the style type has no UoMs configured, the platform-wide quantity list applies.","allOf":[{"$ref":"#/components/schemas/UnitEnumInput"}]},"weight":{"nullable":true,"type":"number","minimum":0},"weightUnit":{"nullable":true,"description":"Unit of measure for `weight`. The values actually accepted are the Weight UoMs configured on the component's style type — read them from `GET /style-types`, or from `type.weightUnits` on the component. A unit outside that list is rejected with `400 invalid_bom_weight_unit`. When the style type has no UoMs configured, the platform-wide weight list applies.","allOf":[{"$ref":"#/components/schemas/UnitEnumInput"}]},"countryOfOrigin":{"nullable":true,"type":"string","maxLength":100},"isMainComponent":{"default":false,"type":"boolean"},"component":{"type":"object","properties":{"styleId":{"type":"string","minLength":1,"description":"The product used as a component — the part this line records. Accepts the Retraced ID or your own externalId. Must carry at least one code."}},"required":["styleId"],"description":"The product used as a component — the part. This is what the line records. It must exist and carry at least one code (`400 component_codes_not_found` otherwise). A different product from `entity`: a t-shirt (entity) lists a fabric (component) in its BOM."}},"required":["bomHeaderId","entity","component"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"bomHeaderId":{"type":"string"},"placementId":{"nullable":true,"type":"string"},"styleId":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"quantityUnit":{"nullable":true,"type":"string"},"weight":{"nullable":true,"type":"number"},"weightUnit":{"nullable":true,"type":"string"},"countryOfOrigin":{"nullable":true,"type":"string"},"isMainComponent":{"type":"boolean"},"createdAt":{"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"}},"required":["id","bomHeaderId","placementId","styleId","quantity","quantityUnit","weight","weightUnit","countryOfOrigin","isMainComponent","createdAt","createdByUserId","createdByCompanyId","updatedAt","updatedByUserId","updatedByCompanyId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/bom-lines/list":{"post":{"tags":["Products/BOM-Lines"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"quantity","type":"string","enum":["quantity","weight","createdAt","updatedAt"]},"bomHeaderId":{"type":"string","minLength":1},"placementId":{"type":"string"},"styleId":{"type":"string","minLength":1},"countryOfOrigin":{"type":"string","minLength":1},"isMainComponent":{"type":"boolean"},"include":{"type":"array","items":{"type":"string","enum":["entity","placement"]}}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"bomHeaderId":{"type":"string"},"placementId":{"nullable":true,"type":"string"},"styleId":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"quantityUnit":{"nullable":true,"type":"string"},"weight":{"nullable":true,"type":"number"},"weightUnit":{"nullable":true,"type":"string"},"countryOfOrigin":{"nullable":true,"type":"string"},"isMainComponent":{"type":"boolean"},"createdAt":{"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"entity":{"type":"object","properties":{"id":{"type":"string"},"externalId":{"nullable":true,"type":"string"},"forCompanyId":{"type":"string"},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string"},"codeValue":{"type":"string"}},"required":["codeId","codeValue"],"additionalProperties":false}},"name":{"type":"string"},"suppliers":{"nullable":true,"type":"array","items":{"type":"string"}},"mainSupplier":{"nullable":true,"type":"string"},"type":{"description":"The component's style type. `quantityUnits` and `weightUnits` are the units this line's `quantityUnit`/`weightUnit` accept — the UoMs configured for the style type, or the platform-wide lists when it has none.","type":"object","properties":{"id":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"quantityUnits":{"type":"array","items":{"type":"string"}},"weightUnits":{"type":"array","items":{"type":"string"}}},"required":["id","name","quantityUnits","weightUnits"],"additionalProperties":false}},"required":["id","forCompanyId","codes","name","suppliers","mainSupplier"],"additionalProperties":false},"placement":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","forCompanyId"],"additionalProperties":false}},"required":["id","bomHeaderId","placementId","styleId","quantity","quantityUnit","weight","weightUnit","countryOfOrigin","isMainComponent","createdAt","createdByUserId","createdByCompanyId","updatedAt","updatedByUserId","updatedByCompanyId"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/bom-lines/delete":{"post":{"tags":["Products/BOM-Lines"],"description":"Remove components from a BOM. `styleId` here is the product whose BOM is being edited (the owning product, not the component) — the same role `entity` plays on create and update. Deleting through a product that only inherits the BOM forks a private copy first, leaving the parent untouched.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"bomLineIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"styleId":{"type":"string","minLength":1,"description":"The product whose BOM you are deleting from (the owning product, not the component) — either the Retraced ID or your own externalId. Deleting through a product that only inherits the BOM forks a private copy first, so the parent keeps its lines."}},"required":["bomLineIds","styleId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"deletedLines":{"type":"array","items":{"type":"string"},"description":"IDs of successfully deleted BOM lines"},"duplicatedHeaders":{"type":"array","items":{"type":"object","properties":{"originalHeaderId":{"type":"string"},"newHeaderId":{"type":"string"},"forEntityId":{"type":"string"},"entityType":{"type":"string","enum":["style","variant","sku"]}},"required":["originalHeaderId","newHeaderId","forEntityId","entityType"],"additionalProperties":false},"description":"Details of headers that were duplicated for child entities"},"orphanedHeaders":{"type":"array","items":{"type":"string"},"description":"IDs of headers that were cleaned up"},"errors":{"type":"array","items":{"type":"object","properties":{"bomLineId":{"type":"string"},"error":{"type":"string"}},"required":["bomLineId","error"],"additionalProperties":false},"description":"Errors encountered during deletion process"}},"required":["deletedLines","duplicatedHeaders","orphanedHeaders","errors"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/bom-lines/{id}":{"put":{"tags":["Products/BOM-Lines"],"description":"Edit a BOM line. As on create, `entity` is the product whose BOM is being edited (it decides whether the shared BOM is edited or forked for that product first) and `component` is the part the line records — they are different products, and both accept a Retraced ID or your own externalId. This is a full replace of the line's optional fields: omitted fields are cleared.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"type":"object","properties":{"styleId":{"type":"string","minLength":1,"description":"The product whose BOM you are writing to — the owning product, not the part. Accepts the Retraced ID or your own externalId. Decides whether the shared BOM is edited or forked for that product first (copy-on-write)."}},"required":["styleId"],"description":"The product whose BOM you are writing to — the owning product, not the part. Never stored on the line: it picks which of the BOM header's links you act through, which decides whether the shared BOM is edited or a private copy is forked for that product first (copy-on-write). Pass the style to edit the BOM for the whole product family; pass a variant or SKU that only inherits the BOM to fork it for that product alone. `bomHeaderId` cannot replace it: one header is linked to the style and to every variant/SKU inheriting it, each link with its own ownership flag."},"component":{"type":"object","properties":{"styleId":{"type":"string","minLength":1,"description":"The product used as a component — the part this line records. Accepts the Retraced ID or your own externalId. Must carry at least one code."}},"required":["styleId"],"description":"The product used as a component — the part. This is what the line records. It must exist and carry at least one code (`400 component_codes_not_found` otherwise). A different product from `entity`: a t-shirt (entity) lists a fabric (component) in its BOM."},"placementId":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number","minimum":0},"quantityUnit":{"nullable":true,"description":"Unit of measure for `quantity`. The values actually accepted are the Quantity UoMs configured on the component's style type — read them from `GET /style-types`, or from `type.quantityUnits` on the component. A unit outside that list is rejected with `400 invalid_bom_quantity_unit`. When the style type has no UoMs configured, the platform-wide quantity list applies.","allOf":[{"$ref":"#/components/schemas/UnitEnumInput"}]},"weight":{"nullable":true,"type":"number","minimum":0},"weightUnit":{"nullable":true,"description":"Unit of measure for `weight`. The values actually accepted are the Weight UoMs configured on the component's style type — read them from `GET /style-types`, or from `type.weightUnits` on the component. A unit outside that list is rejected with `400 invalid_bom_weight_unit`. When the style type has no UoMs configured, the platform-wide weight list applies.","allOf":[{"$ref":"#/components/schemas/UnitEnumInput"}]},"countryOfOrigin":{"nullable":true,"type":"string","maxLength":100},"isMainComponent":{"type":"boolean"}},"required":["entity","component"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"bomHeaderId":{"type":"string"},"placementId":{"nullable":true,"type":"string"},"styleId":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"quantityUnit":{"nullable":true,"type":"string"},"weight":{"nullable":true,"type":"number"},"weightUnit":{"nullable":true,"type":"string"},"countryOfOrigin":{"nullable":true,"type":"string"},"isMainComponent":{"type":"boolean"},"createdAt":{"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"}},"required":["id","bomHeaderId","placementId","styleId","quantity","quantityUnit","weight","weightUnit","countryOfOrigin","isMainComponent","createdAt","createdByUserId","createdByCompanyId","updatedAt","updatedByUserId","updatedByCompanyId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/bom-placements/":{"post":{"tags":["Products/BOM-Placements"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":255}},"required":["value"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"forCompanyId":{"type":"string","minLength":1},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"}},"required":["id","value","forCompanyId","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/bom-placements/{id}":{"get":{"tags":["Products/BOM-Placements"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"forCompanyId":{"type":"string","minLength":1},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"}},"required":["id","value","forCompanyId","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/bom-placements/list":{"post":{"tags":["Products/BOM-Placements"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"createdAt","type":"string","enum":["createdAt","updatedAt","value"]},"ids":{"type":"array","items":{"type":"string","minLength":1}},"value":{"type":"string"}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"forCompanyId":{"type":"string","minLength":1},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"}},"required":["id","value","forCompanyId","createdAt","updatedAt"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/{entityName}/{id}/certifications":{"get":{"tags":["Products/Certifications"],"description":"Returns all the visible claims/certifications for the given style.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500},"in":"query","name":"limit","required":false,"description":"Number of results per page. The default and maximum vary per endpoint."},{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","required":false,"description":"Page number (1-based). Defaults to 1."},{"schema":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"in":"query","name":"order","required":false},{"schema":{"default":"name","type":"string","enum":["name","updatedAt","expirationDate","status","type"]},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":255},"in":"query","name":"q","required":false},{"schema":{"type":"string"},"in":"query","name":"type","required":false},{"schema":{"type":"boolean"},"in":"query","name":"isCertification","required":false},{"schema":{"type":"boolean"},"in":"query","name":"hasDocument","required":false},{"schema":{"type":"string"},"in":"query","name":"companyId","required":false},{"schema":{"type":"string"},"in":"query","name":"role","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"type":"string"},"in":"path","name":"entityName","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"standardId":{"type":"string"},"companyId":{"type":"string"},"name":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"logoFileUrl":{"nullable":true,"type":"string"},"companyName":{"nullable":true,"type":"string"},"companyOfficialName":{"nullable":true,"type":"string"},"expirationDate":{"nullable":true,"type":"string","format":"date-time"},"documentNumber":{"nullable":true,"type":"string"},"licenseNumber":{"nullable":true,"type":"string"},"issueDate":{"nullable":true,"type":"string","format":"date-time"},"issuedBy":{"nullable":true,"type":"string"},"explanation":{"nullable":true,"type":"string"},"fileUrl":{"nullable":true,"type":"string"},"certificateDependencies":{"nullable":true,"type":"object","properties":{"products":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"fileContentType":{"nullable":true,"type":"string"},"isValidWithLatestRules":{"nullable":true,"type":"boolean"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"}},"required":["id","status","standardId","companyId","name","type","logoFileUrl","companyName","companyOfficialName","expirationDate","documentNumber","licenseNumber","issueDate","issuedBy","explanation","fileUrl","certificateDependencies","fileContentType","isValidWithLatestRules","createdAt","updatedAt","createdByUserId","createdByCompanyId","updatedByUserId","updatedByCompanyId"],"additionalProperties":false}}},"required":["meta","data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/styles/{id}/style-documents":{"get":{"tags":["Styles/Documents"],"description":"Lists documents attached to a style. Scoped to the caller's company; archived documents are excluded by default and only returned when isArchived=true.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"name","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"documentTypeId","required":false},{"schema":{"anyOf":[{"type":"string"},{"type":"boolean"}]},"in":"query","name":"isArchived","required":false},{"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"count","required":false},{"schema":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"in":"query","name":"order","required":false},{"schema":{"default":"updatedAt","type":"string","enum":["updatedAt","name","documentType"]},"in":"query","name":"sort","required":false},{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"fileId":{"type":"string"},"fileUrl":{"nullable":true,"type":"string"},"documentTypeId":{"type":"string"},"documentClass":{"nullable":true,"type":"string"},"documentType":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"documentClass":{"type":"string","enum":["TRANSACTIONAL","COMPANY","PRODUCT"]},"isDeprecated":{"type":"boolean"},"impactAreaId":{"nullable":true,"type":"string"}},"required":["id","title","documentClass","isDeprecated","impactAreaId"],"additionalProperties":false},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"isArchived":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{}}},"required":["id","name","fileId","fileUrl","documentTypeId","documentClass","documentType","createdAt","updatedAt","isArchived","metadata"],"additionalProperties":false}}},"required":["meta","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"post":{"tags":["Styles/Documents"],"description":"Creates a style document referencing an already-uploaded file. Does not trigger any extraction or processing.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"documentTypeId":{"type":"string","minLength":1,"maxLength":64},"documentClass":{"nullable":true,"type":"string","minLength":1,"maxLength":255},"fileId":{"type":"string","minLength":1,"maxLength":36}},"required":["documentTypeId","fileId"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"fileId":{"type":"string"},"fileUrl":{"nullable":true,"type":"string"},"documentTypeId":{"type":"string"},"documentClass":{"nullable":true,"type":"string"},"documentType":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"documentClass":{"type":"string","enum":["TRANSACTIONAL","COMPANY","PRODUCT"]},"isDeprecated":{"type":"boolean"},"impactAreaId":{"nullable":true,"type":"string"}},"required":["id","title","documentClass","isDeprecated","impactAreaId"],"additionalProperties":false},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"isArchived":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{}}},"required":["id","name","fileId","fileUrl","documentTypeId","documentClass","documentType","createdAt","updatedAt","isArchived","metadata"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/styles/{id}/style-documents/bulk-delete":{"post":{"tags":["Styles/Documents"],"description":"Permanently deletes multiple documents attached to the given style in a single request. All-or-nothing: if the style is not visible to the caller's company, or any id is unknown / belongs to a different style, the whole request is rejected with a 404 (details.styleDocumentIds lists the offending ids where relevant) and no documents are deleted.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":36}}},"required":["ids"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/styles/{id}/style-documents/bulk-archive":{"post":{"tags":["Styles/Documents"],"description":"Archives or unarchives multiple documents attached to the given style in a single request. All-or-nothing: if the style is not visible to the caller's company, or any id is unknown / belongs to a different style, the request is rejected with a 404 (details.styleDocumentIds lists the offending ids where relevant) and no documents are modified. Direction is set by the isArchived boolean in the body.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":36}},"isArchived":{"type":"boolean"}},"required":["ids","isArchived"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"fileId":{"type":"string"},"fileUrl":{"nullable":true,"type":"string"},"documentTypeId":{"type":"string"},"documentClass":{"nullable":true,"type":"string"},"documentType":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"documentClass":{"type":"string","enum":["TRANSACTIONAL","COMPANY","PRODUCT"]},"isDeprecated":{"type":"boolean"},"impactAreaId":{"nullable":true,"type":"string"}},"required":["id","title","documentClass","isDeprecated","impactAreaId"],"additionalProperties":false},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"isArchived":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{}}},"required":["id","name","fileId","fileUrl","documentTypeId","documentClass","documentType","createdAt","updatedAt","isArchived","metadata"],"additionalProperties":false}}},"required":["documents"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/styles/{id}/style-documents/download":{"post":{"tags":["Styles/Documents"],"description":"Bundles a selection of style documents (by fileId) into a single ZIP archive and returns a signed download URL. Scoped to the caller's company; ids that do not belong to this style or company are rejected all-or-nothing with a 404 and details.fileIds listing the offending ids. A non-existent style returns style_not_found (404). An empty selection is rejected with a 400 by the route schema (min length 1) and again by the service as empty_file_ids.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileIds":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":36}}},"required":["fileIds"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"url":{"type":"string","minLength":1}},"required":["url"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/styles/{id}/style-order-documents":{"get":{"tags":["Styles/OrderDocuments"],"description":"Lists tracing documents attached to POs and SOs that reference a style. Scoped to the caller's company via style ownership + the caller's own order books. Cross-company docs surface via the supply-chain tracing_link — this is by design (buyer sees supplier-uploaded docs and vice versa). Response is aggregated by (file, document type): a single file with heterogeneous document types yields one entry per type. `orderList` includes both purchase and sales orders, discriminated by the `orderType` field. Archived (is_removed) documents are excluded by default; only returned when isArchived=true. Returns 404 (code: style_not_found) if the style is unknown or belongs to another company.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"name","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"documentTypeId","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"orderNumber","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"supplier","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"buyer","required":false},{"schema":{"anyOf":[{"type":"string"},{"type":"boolean"}]},"in":"query","name":"isArchived","required":false},{"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"count","required":false},{"schema":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"in":"query","name":"order","required":false},{"schema":{"default":"updatedAt","type":"string","enum":["updatedAt","name","documentType","orderNumber","supplier","buyer"]},"in":"query","name":"sort","required":false},{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string"},"documentId":{"nullable":true,"type":"string"},"name":{"type":"string"},"fileUrl":{"nullable":true,"type":"string"},"documentTypeId":{"nullable":true,"type":"string"},"documentType":{"nullable":true,"type":"object","properties":{"id":{"nullable":true,"type":"string"},"title":{"type":"string"},"documentClass":{"nullable":true,"type":"string","enum":["TRANSACTIONAL","COMPANY"]},"isDeprecated":{"type":"boolean"},"impactAreaId":{"nullable":true,"type":"string"}},"required":["id","title","documentClass","isDeprecated","impactAreaId"],"additionalProperties":false},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"isArchived":{"type":"boolean"},"orderList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"string"},"orderType":{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER"]},"buyer":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"supplier":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["id","orderNumber","orderType","buyer","supplier"],"additionalProperties":false}}},"required":["fileId","documentId","name","fileUrl","documentTypeId","documentType","createdAt","updatedAt","isArchived","orderList"],"additionalProperties":false}}},"required":["meta","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/styles/{id}/style-order-documents/download":{"post":{"tags":["Styles/OrderDocuments"],"description":"Bundles a selection of style-order documents (by fileId) into a single ZIP archive and returns a signed download URL. Documents are those reachable from the style via its linked purchase/sales orders. Scoped to the caller's company; ids that do not resolve to a linked order for this style/company are rejected all-or-nothing with a 404 and details.fileIds listing the offending ids. A non-existent style returns style_not_found (404). An empty selection is rejected with a 400 by the route schema (min length 1) and again by the service as empty_file_ids.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileIds":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":36}}},"required":["fileIds"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"url":{"type":"string","minLength":1}},"required":["url"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/{entity_name}/{id}/traced-orders":{"get":{"tags":["Products/Cascade-Tracing"],"parameters":[{"schema":{"nullable":true,"type":"string"},"in":"path","name":"entity_name","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"purchaseOrders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryDate":{"nullable":true,"anyOf":[{"type":"string"}]},"orderNumber":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"anyOf":[{"type":"string"}]},"tracingOrderId":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"receiverTracingNodeId":{"nullable":true,"type":"string"},"agreedDeliveryDate":{"nullable":true,"anyOf":[{"type":"string"}]},"tracingSalesOrderNumber":{"nullable":true,"type":"string"},"tracingPurchaseOrderNumber":{"nullable":true,"type":"string"},"productIds":{"nullable":true,"type":"string"},"buyerCompanyId":{"nullable":true,"type":"string"},"supplierCompanyId":{"nullable":true,"type":"string"},"receiverCompanyId":{"nullable":true,"type":"string"},"tracingAttachmentTemplateId":{"nullable":true,"type":"string"},"scDocCompletionPercentage":{"nullable":true,"type":"number"},"docCompletionPercentage":{"nullable":true,"type":"number"},"lastProductionProcessId":{"nullable":true,"type":"string"},"isInternal":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"}]},"createdBy":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"}]},"updatedBy":{"nullable":true,"type":"string"},"count":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false}},"salesOrders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deliveryDate":{"nullable":true,"anyOf":[{"type":"string"}]},"orderNumber":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"anyOf":[{"type":"string"}]},"tracingOrderId":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"receiverTracingNodeId":{"nullable":true,"type":"string"},"agreedDeliveryDate":{"nullable":true,"anyOf":[{"type":"string"}]},"tracingSalesOrderNumber":{"nullable":true,"type":"string"},"tracingPurchaseOrderNumber":{"nullable":true,"type":"string"},"productIds":{"nullable":true,"type":"string"},"buyerCompanyId":{"nullable":true,"type":"string"},"supplierCompanyId":{"nullable":true,"type":"string"},"receiverCompanyId":{"nullable":true,"type":"string"},"tracingAttachmentTemplateId":{"nullable":true,"type":"string"},"scDocCompletionPercentage":{"nullable":true,"type":"number"},"docCompletionPercentage":{"nullable":true,"type":"number"},"lastProductionProcessId":{"nullable":true,"type":"string"},"isInternal":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"}]},"createdBy":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"}]},"updatedBy":{"nullable":true,"type":"string"},"count":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false}}},"required":["purchaseOrders","salesOrders"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/dpp/":{"post":{"tags":["Products/DPP"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"minItems":1,"type":"array","items":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"tracingType":{"type":"string","enum":["SUPPLY_CHAIN_MAPPINGS","CASCADE_MAPPINGS","TRACING_PURCHASE_ORDERS","TRACING_SALES_ORDERS"]},"tracingId":{"type":"string","minLength":1},"isActive":{"type":"boolean"}},"required":["styleId","tracingType","tracingId","isActive"]}}},"required":["items"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"styleId":{"type":"string"},"success":{"type":"boolean"},"error":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"styleId":{"type":"string"},"tracingType":{"type":"string"},"tracingId":{"type":"string"},"isActive":{"type":"boolean"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","companyId","styleId","tracingType","tracingId","isActive","createdAt","updatedAt"],"additionalProperties":false}},"required":["styleId","success"],"additionalProperties":false}},"summary":{"type":"object","properties":{"total":{"type":"number"},"succeeded":{"type":"number"},"failed":{"type":"number"}},"required":["total","succeeded","failed"],"additionalProperties":false}},"required":["results","summary"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/v3/webshop/{lang}/products/{id}":{"get":{"tags":["Webshop"],"description":"Returns the latest journey of the given product ID.","parameters":[{"schema":{"type":"string","minLength":2,"maxLength":2},"in":"path","name":"lang","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebshopJourneyResponseSchema"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}}}}},"/api/v3/webshop/{lang}/cards":{"get":{"tags":["Webshop"],"description":"Returns just the information required to show an item in a web-shop: Existence boolean and three tags.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"sku","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"productExtendedIdentifier","required":false},{"schema":{"type":"string","minLength":1,"pattern":"^[^:]+:.+$"},"in":"query","name":"clientIdentifier","required":false},{"schema":{"type":"string","minLength":2,"maxLength":2},"in":"path","name":"lang","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"isSKUMatched":{"type":"boolean"},"isProductMatched":{"type":"boolean"},"id":{"type":"string"},"productId":{"type":"string"},"styleId":{"type":"string"},"brandId":{"nullable":true,"type":"string"},"idx":{"type":"number"},"color":{"nullable":true,"type":"string"},"colorImageId":{"nullable":true,"type":"string"},"colorImageUrl":{"nullable":true,"type":"string"},"originalColorImageUrl":{"nullable":true,"type":"string"},"otherAttributes":{"nullable":true,"type":"string"},"sku":{"nullable":true,"type":"string"},"badges":{"type":"array","items":{"type":"object","properties":{"badge":{"type":"object","properties":{"id":{"type":"string"},"category":{"nullable":true,"type":"string"},"standardId":{"nullable":true,"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"descriptionDe":{"nullable":true,"type":"string"},"descriptionEs":{"nullable":true,"type":"string"},"descriptionFr":{"nullable":true,"type":"string"},"nameDe":{"nullable":true,"type":"string"},"nameEs":{"nullable":true,"type":"string"},"nameFr":{"nullable":true,"type":"string"},"imageFileUrl":{"nullable":true,"type":"string"},"originalImageFileUrl":{"nullable":true,"type":"string"},"translations":{"type":"object","additionalProperties":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false}}},"required":["id","name"],"additionalProperties":false},"proofs":{"nullable":true}},"required":["badge"],"additionalProperties":false}}},"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}}}}},"/api/v3/webshop/{lang}/icons":{"get":{"tags":["Webshop"],"description":"Returns just the information required to show an item in a web-shop: Existence boolean and three tags.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"sku","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"productExtendedIdentifier","required":false},{"schema":{"type":"string","minLength":1,"pattern":"^[^:]+:.+$"},"in":"query","name":"clientIdentifier","required":false},{"schema":{"type":"string","minLength":2,"maxLength":2},"in":"path","name":"lang","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"isSKUMatched":{"type":"boolean"},"isProductMatched":{"type":"boolean"},"id":{"type":"string"},"productId":{"type":"string"},"styleId":{"type":"string"},"brandId":{"nullable":true,"type":"string"},"idx":{"type":"number"},"color":{"nullable":true,"type":"string"},"colorImageId":{"nullable":true,"type":"string"},"colorImageUrl":{"nullable":true,"type":"string"},"originalColorImageUrl":{"nullable":true,"type":"string"},"otherAttributes":{"nullable":true,"type":"string"},"sku":{"nullable":true,"type":"string"},"badges":{"type":"array","items":{"type":"object","properties":{"badge":{"type":"object","properties":{"id":{"type":"string"},"category":{"nullable":true,"type":"string"},"standardId":{"nullable":true,"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"descriptionDe":{"nullable":true,"type":"string"},"descriptionEs":{"nullable":true,"type":"string"},"descriptionFr":{"nullable":true,"type":"string"},"nameDe":{"nullable":true,"type":"string"},"nameEs":{"nullable":true,"type":"string"},"nameFr":{"nullable":true,"type":"string"},"imageFileUrl":{"nullable":true,"type":"string"},"originalImageFileUrl":{"nullable":true,"type":"string"},"translations":{"type":"object","additionalProperties":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false}}},"required":["id","name"],"additionalProperties":false},"proofs":{"nullable":true}},"required":["badge"],"additionalProperties":false}}},"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}}}}},"/api/v3/webshop/{lang}/icons-with-description":{"get":{"tags":["Webshop"],"description":"Returns just the information required to show an item in a web-shop: Existence boolean and three tags.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"sku","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"productExtendedIdentifier","required":false},{"schema":{"type":"string","minLength":1,"pattern":"^[^:]+:.+$"},"in":"query","name":"clientIdentifier","required":false},{"schema":{"type":"string","minLength":2,"maxLength":2},"in":"path","name":"lang","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"isSKUMatched":{"type":"boolean"},"isProductMatched":{"type":"boolean"},"id":{"type":"string"},"productId":{"type":"string"},"styleId":{"type":"string"},"brandId":{"nullable":true,"type":"string"},"idx":{"type":"number"},"color":{"nullable":true,"type":"string"},"colorImageId":{"nullable":true,"type":"string"},"colorImageUrl":{"nullable":true,"type":"string"},"originalColorImageUrl":{"nullable":true,"type":"string"},"otherAttributes":{"nullable":true,"type":"string"},"sku":{"nullable":true,"type":"string"},"badges":{"type":"array","items":{"type":"object","properties":{"badge":{"type":"object","properties":{"id":{"type":"string"},"category":{"nullable":true,"type":"string"},"standardId":{"nullable":true,"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"descriptionDe":{"nullable":true,"type":"string"},"descriptionEs":{"nullable":true,"type":"string"},"descriptionFr":{"nullable":true,"type":"string"},"nameDe":{"nullable":true,"type":"string"},"nameEs":{"nullable":true,"type":"string"},"nameFr":{"nullable":true,"type":"string"},"imageFileUrl":{"nullable":true,"type":"string"},"originalImageFileUrl":{"nullable":true,"type":"string"},"translations":{"type":"object","additionalProperties":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false}}},"required":["id","name"],"additionalProperties":false},"proofs":{"nullable":true}},"required":["badge"],"additionalProperties":false}}},"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}}}}},"/api/v3/webshop/{lang}/claim/{id}":{"get":{"tags":["Webshop"],"description":"Returns a claim with standard/certification details.","parameters":[{"schema":{"type":"string","minLength":2,"maxLength":2},"in":"path","name":"lang","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"companyName":{"nullable":true,"type":"string"},"standardId":{"nullable":true,"type":"string"},"explanation":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"expirationDate":{"nullable":true,"type":"string","format":"date-time"},"issueDate":{"nullable":true,"type":"string","format":"date-time"},"issuedBy":{"nullable":true,"type":"string"},"fileUrl":{"nullable":true,"type":"string"},"originalFileUrl":{"nullable":true,"type":"string"},"fileType":{"nullable":true,"type":"string"},"documentNumber":{"nullable":true,"type":"string"},"licenseNumber":{"nullable":true,"type":"string"},"livingWage":{"nullable":true,"type":"number"},"minimumWage":{"nullable":true,"type":"number"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"logoFileUrl":{"nullable":true,"type":"string"},"originalLogoFileUrl":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"}},"required":["id","companyId"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}}}}},"/api/v3/webshop/{lang}/button-transparency-report":{"get":{"tags":["Webshop"],"description":"Returns just the information required to show an item in a web-shop: Existence boolean and Supply Chain Transparency badge only.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"sku","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"productExtendedIdentifier","required":false},{"schema":{"type":"string","minLength":1,"pattern":"^[^:]+:.+$"},"in":"query","name":"clientIdentifier","required":false},{"schema":{"type":"string","minLength":2,"maxLength":2},"in":"path","name":"lang","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"isSKUMatched":{"type":"boolean"},"isProductMatched":{"type":"boolean"},"id":{"type":"string"},"productId":{"type":"string"},"styleId":{"type":"string"},"brandId":{"nullable":true,"type":"string"},"idx":{"type":"number"},"color":{"nullable":true,"type":"string"},"colorImageId":{"nullable":true,"type":"string"},"colorImageUrl":{"nullable":true,"type":"string"},"originalColorImageUrl":{"nullable":true,"type":"string"},"otherAttributes":{"nullable":true,"type":"string"},"sku":{"nullable":true,"type":"string"},"badges":{"type":"array","items":{"type":"object","properties":{"badge":{"type":"object","properties":{"id":{"type":"string"},"category":{"nullable":true,"type":"string"},"standardId":{"nullable":true,"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"descriptionDe":{"nullable":true,"type":"string"},"descriptionEs":{"nullable":true,"type":"string"},"descriptionFr":{"nullable":true,"type":"string"},"nameDe":{"nullable":true,"type":"string"},"nameEs":{"nullable":true,"type":"string"},"nameFr":{"nullable":true,"type":"string"},"imageFileUrl":{"nullable":true,"type":"string"},"originalImageFileUrl":{"nullable":true,"type":"string"},"translations":{"type":"object","additionalProperties":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false}}},"required":["id","name"],"additionalProperties":false},"proofs":{"nullable":true}},"required":["badge"],"additionalProperties":false}}},"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}}}}},"/api/v3/webshop/{lang}/button-verified":{"get":{"tags":["Webshop"],"description":"Returns just the information required to show an item in a web-shop: Existence boolean and three tags.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"sku","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"productExtendedIdentifier","required":false},{"schema":{"type":"string","minLength":1,"pattern":"^[^:]+:.+$"},"in":"query","name":"clientIdentifier","required":false},{"schema":{"type":"string","minLength":2,"maxLength":2},"in":"path","name":"lang","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"isSKUMatched":{"type":"boolean"},"isProductMatched":{"type":"boolean"},"id":{"type":"string"},"productId":{"type":"string"},"styleId":{"type":"string"},"brandId":{"nullable":true,"type":"string"},"idx":{"type":"number"},"color":{"nullable":true,"type":"string"},"colorImageId":{"nullable":true,"type":"string"},"colorImageUrl":{"nullable":true,"type":"string"},"originalColorImageUrl":{"nullable":true,"type":"string"},"otherAttributes":{"nullable":true,"type":"string"},"sku":{"nullable":true,"type":"string"},"badges":{"type":"array","items":{"type":"object","properties":{"badge":{"type":"object","properties":{"id":{"type":"string"},"category":{"nullable":true,"type":"string"},"standardId":{"nullable":true,"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"descriptionDe":{"nullable":true,"type":"string"},"descriptionEs":{"nullable":true,"type":"string"},"descriptionFr":{"nullable":true,"type":"string"},"nameDe":{"nullable":true,"type":"string"},"nameEs":{"nullable":true,"type":"string"},"nameFr":{"nullable":true,"type":"string"},"imageFileUrl":{"nullable":true,"type":"string"},"originalImageFileUrl":{"nullable":true,"type":"string"},"translations":{"type":"object","additionalProperties":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false}}},"required":["id","name"],"additionalProperties":false},"proofs":{"nullable":true}},"required":["badge"],"additionalProperties":false}}},"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}}}}},"/api/v3/webshop/{lang}/company-certificates/{id}":{"get":{"tags":["Webshop","Map"],"description":"Returns approved certificates and memberships of a company.","parameters":[{"schema":{"default":1,"type":"number"},"in":"query","name":"page","required":false},{"schema":{"default":25,"type":"number"},"in":"query","name":"count","required":false},{"schema":{"type":"string"},"in":"query","name":"sort","required":false},{"schema":{"type":"string"},"in":"query","name":"q","required":false},{"schema":{"type":"string"},"in":"query","name":"filter","required":false},{"schema":{"type":"boolean"},"in":"query","name":"isDropDown","required":false},{"schema":{"type":"string","minLength":2,"maxLength":2},"in":"path","name":"lang","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"standardId":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"explanation":{"nullable":true,"type":"string"},"fileUrl":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"licenseNumber":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"logoFileUrl":{"nullable":true,"type":"string"},"originalLogoFileUrl":{"nullable":true,"type":"string"},"translations":{"type":"object","additionalProperties":{"type":"object","properties":{"name":{"type":"string"},"description":{"nullable":true,"type":"string"}},"additionalProperties":false}}},"required":["id","standardId","status","explanation","fileUrl","companyId","updatedAt","licenseNumber","name","description","logoFileUrl","originalLogoFileUrl"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","pageSize","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","error","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","error","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","error","message"],"additionalProperties":false}}}}}}},"/api/styles/":{"post":{"tags":["Products/Styles"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"Display name of the product."},"forCompanyId":{"description":"Retraced ID of the brand or company that owns this product.","type":"string"},"codes":{"minItems":1,"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"]},"description":"Array of external identifier objects. Each entry has a codeId (the system type) and a codeValue (the value in that system). Supported codeId values: ERP_ID (ERP system ID), PLM_ID (PLM system ID), PIM_ID (PIM system ID), MAIN_SUPPLIERS_ID (supplier's own product reference), UPC_GTIN_12 (12-digit barcode), EAN_GTIN_13 (13-digit barcode), ZALANDO_ID, FASHIONCLOUD_ID — each may appear at most once per product. OTHER_ID[N] and ALTERNATIVE_SUPPLIERS_ID[N] support multiple entries by appending a numeric suffix (e.g. OTHER_ID1, OTHER_ID2). A product can carry codes from multiple systems simultaneously."},"description":{"nullable":true,"description":"Free-text product description. Nullable.","type":"string","maxLength":4000},"gender":{"nullable":true,"description":"Product gender classification. Known values: MALE, FEMALE, UNISEX. Nullable.","type":"string","maxLength":50},"styleTypeId":{"type":"string","minLength":1,"description":"Retraced taxonomy identifier for the specific product type within the styleLevelId (e.g. TSHIRTS, OUTDOOR_JACKETS, BUTTONS). For the full list of valid values call GET /api/v2/style-types/."},"brands":{"nullable":true,"description":"User-defined brand labels associated with this product. Free-text strings set by the brand — no fixed taxonomy or lookup endpoint. Use to identify which sub-brand a product is sold under (e.g. 'Columbia', 'Prana').","type":"array","items":{"type":"string","minLength":1}},"departments":{"nullable":true,"description":"User-defined department labels. Free-text strings set by the user — no fixed taxonomy or lookup endpoint.","type":"array","items":{"type":"string","minLength":1}},"seasons":{"nullable":true,"description":"User-defined season labels. Free-text strings set by the user — no fixed taxonomy or lookup endpoint.","type":"array","items":{"type":"string","minLength":1}},"collections":{"nullable":true,"description":"User-defined collection labels. Free-text strings set by the user — no fixed taxonomy or lookup endpoint.","type":"array","items":{"type":"string","minLength":1}},"claimIntentions":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"customProperties":{"nullable":true,"type":"string"},"suppliers":{"nullable":true,"description":"Array of supplier IDs that can fulfil this product, including the main supplier and any alternates. Use the companyId values here to query GET /supply-chains/:styleId for detailed supply chain data.","type":"array","items":{"type":"string","minLength":1}},"mainSupplier":{"nullable":true,"description":"The single designated primary supplier for this product. Null if not set. A product can have many entries in suppliers but at most one mainSupplier.","type":"string","minLength":1},"vendors":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"imagesFileIds":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"isComponent":{"type":"boolean","description":"True if this style is a sub-product (e.g. a fabric or trim piece) intended to be assembled into a finished good, rather than sold directly to a consumer. Components appear in BOM (bill of materials) relationships rather than as standalone products."},"isStoryActive":{"type":"boolean"},"ecoFootPrint":{"nullable":true,"type":"object","properties":{"hazardousMaterials":{"nullable":true,"type":"array","items":{"type":"object","properties":{"idx":{"type":"number"},"name":{"type":"string","minLength":1},"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["idx","name","percentage"]}},"recyclabilityAbsenceDisruptor":{"nullable":true,"type":"boolean"},"recyclabilityCanBeSorted":{"nullable":true,"type":"boolean"},"recyclabilityCanCollectAtScale":{"nullable":true,"type":"boolean"},"recyclabilityIndustrialScale":{"nullable":true,"type":"boolean"},"recyclabilityRate":{"nullable":true,"type":"number"}}},"weight":{"description":"Product weight object. unit is the unit of measurement (e.g. 'GRAM'). value is the numeric weight. Null if weight has not been entered.","nullable":true,"type":"object","properties":{"unit":{"nullable":true,"type":"string","enum":["GRAM","GRAM_PER_SQUARE_METER","GRAM_PER_SQUARE_FOOT","GRAM_PER_SQUARE_YARD","OUNCE_PER_SQUARE_YARD","MILLIGRAM","KILOGRAM","METRIC_TON","POUNDS","SHORT_TON","LONG_TON","HUNDREDWEIGHT","SHORT_HUNDREDWEIGHT","LONG_HUNDREDWEIGHT","OUNCE","DRAM","GRAIN","PENNYWEIGHT","SCRUPLE","STONE"]},"value":{"nullable":true,"type":"number"}},"required":["unit","value"]},"externalId":{"type":"string","minLength":1,"maxLength":255,"description":"Your own identifier for this product. Unique per company across all product levels. Can be used in place of the Retraced ID on any product ID field in this API. On update it is only written when the field is present in the body — omitting it keeps the stored value, sending null clears it."}},"required":["name","codes","styleTypeId","isComponent"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"$ref":"#/components/schemas/StyleSchema"}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/styles/bulk-update":{"put":{"tags":["Products - Styles"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"styleIds":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string"}},"collection":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1}},"required":["value"]}},"isStoryActive":{"type":"boolean"},"isComponent":{"type":"boolean"},"applyToChildren":{"default":true,"type":"boolean"}},"required":["styleIds"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"updatedCount":{"type":"number"},"variantsUpdatedCount":{"type":"number"},"skusUpdatedCount":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"styleId":{"type":"string"},"styleName":{"type":"string"},"error":{"type":"string"}},"required":["styleId","styleName","error"],"additionalProperties":false}}},"required":["updatedCount","variantsUpdatedCount","skusUpdatedCount"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/styles/{id}":{"put":{"tags":["Products/Styles"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"Display name of the product."},"forCompanyId":{"description":"Retraced ID of the brand or company that owns this product.","type":"string"},"codes":{"minItems":1,"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"]},"description":"Array of external identifier objects. Each entry has a codeId (the system type) and a codeValue (the value in that system). Supported codeId values: ERP_ID (ERP system ID), PLM_ID (PLM system ID), PIM_ID (PIM system ID), MAIN_SUPPLIERS_ID (supplier's own product reference), UPC_GTIN_12 (12-digit barcode), EAN_GTIN_13 (13-digit barcode), ZALANDO_ID, FASHIONCLOUD_ID — each may appear at most once per product. OTHER_ID[N] and ALTERNATIVE_SUPPLIERS_ID[N] support multiple entries by appending a numeric suffix (e.g. OTHER_ID1, OTHER_ID2). A product can carry codes from multiple systems simultaneously."},"description":{"nullable":true,"description":"Free-text product description. Nullable.","type":"string","maxLength":4000},"gender":{"nullable":true,"description":"Product gender classification. Known values: MALE, FEMALE, UNISEX. Nullable.","type":"string","maxLength":50},"brands":{"nullable":true,"description":"User-defined brand labels associated with this product. Free-text strings set by the brand — no fixed taxonomy or lookup endpoint. Use to identify which sub-brand a product is sold under (e.g. 'Columbia', 'Prana').","type":"array","items":{"type":"string","minLength":1}},"departments":{"nullable":true,"description":"User-defined department labels. Free-text strings set by the user — no fixed taxonomy or lookup endpoint.","type":"array","items":{"type":"string","minLength":1}},"seasons":{"nullable":true,"description":"User-defined season labels. Free-text strings set by the user — no fixed taxonomy or lookup endpoint.","type":"array","items":{"type":"string","minLength":1}},"collections":{"nullable":true,"description":"User-defined collection labels. Free-text strings set by the user — no fixed taxonomy or lookup endpoint.","type":"array","items":{"type":"string","minLength":1}},"claimIntentions":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"customProperties":{"nullable":true,"type":"string"},"suppliers":{"nullable":true,"description":"Array of supplier IDs that can fulfil this product, including the main supplier and any alternates. Use the companyId values here to query GET /supply-chains/:styleId for detailed supply chain data.","type":"array","items":{"type":"string","minLength":1}},"mainSupplier":{"nullable":true,"description":"The single designated primary supplier for this product. Null if not set. A product can have many entries in suppliers but at most one mainSupplier.","type":"string","minLength":1},"vendors":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"imagesFileIds":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"isStoryActive":{"type":"boolean"},"ecoFootPrint":{"nullable":true,"type":"object","properties":{"hazardousMaterials":{"nullable":true,"type":"array","items":{"type":"object","properties":{"idx":{"type":"number"},"name":{"type":"string","minLength":1},"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["idx","name","percentage"]}},"recyclabilityAbsenceDisruptor":{"nullable":true,"type":"boolean"},"recyclabilityCanBeSorted":{"nullable":true,"type":"boolean"},"recyclabilityCanCollectAtScale":{"nullable":true,"type":"boolean"},"recyclabilityIndustrialScale":{"nullable":true,"type":"boolean"},"recyclabilityRate":{"nullable":true,"type":"number"}}},"weight":{"description":"Product weight object. unit is the unit of measurement (e.g. 'GRAM'). value is the numeric weight. Null if weight has not been entered.","nullable":true,"type":"object","properties":{"unit":{"nullable":true,"type":"string","enum":["GRAM","GRAM_PER_SQUARE_METER","GRAM_PER_SQUARE_FOOT","GRAM_PER_SQUARE_YARD","OUNCE_PER_SQUARE_YARD","MILLIGRAM","KILOGRAM","METRIC_TON","POUNDS","SHORT_TON","LONG_TON","HUNDREDWEIGHT","SHORT_HUNDREDWEIGHT","LONG_HUNDREDWEIGHT","OUNCE","DRAM","GRAIN","PENNYWEIGHT","SCRUPLE","STONE"]},"value":{"nullable":true,"type":"number"}},"required":["unit","value"]},"externalId":{"nullable":true,"type":"string","minLength":1,"maxLength":255,"description":"Your own identifier for this product. Unique per company across all product levels. Can be used in place of the Retraced ID on any product ID field in this API. On update it is only written when the field is present in the body — omitting it keeps the stored value, sending null clears it."},"styleTypeId":{"type":"string","minLength":1},"styleLevelId":{"type":"string","minLength":1}},"required":["name","codes"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"$ref":"#/components/schemas/StyleSchema"}},"required":["metadata","data"],"additionalProperties":false}}}}}},"get":{"tags":["Products/Styles"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"$ref":"#/components/schemas/StyleSchema"}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/styles/archive":{"post":{"tags":["Products/Styles"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"shouldUnarchiveChildren":{"default":true,"type":"boolean"}},"required":["ids"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/styles/unarchive":{"post":{"tags":["Products/Styles"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"shouldUnarchiveChildren":{"default":true,"type":"boolean"}},"required":["ids"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/styles/list":{"post":{"tags":["Products/Styles"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"createdAt","type":"string","enum":["createdAt","updatedAt","name","gender","typeName"]},"name":{"type":"string"},"nameOrCode":{"type":"string"},"codes":{"type":"object","properties":{"codeId":{"type":"string"},"codeValue":{"type":"string"}}},"description":{"type":"string"},"gender":{"type":"string"},"styleTypeId":{"type":"string"},"styleLevelId":{"type":"string"},"brands":{"type":"array","items":{"type":"string","minLength":1}},"departments":{"type":"array","items":{"type":"string","minLength":1}},"seasons":{"type":"array","items":{"type":"string","minLength":1}},"collections":{"type":"array","items":{"type":"string","minLength":1}},"suppliers":{"type":"array","items":{"type":"string","minLength":1}},"mainSupplier":{"type":"string"},"vendors":{"type":"array","items":{"type":"string","minLength":1}},"linkedCompanyId":{"description":"Match styles where this company id appears in main_supplier, suppliers (CSV), or vendors (CSV).","type":"string","minLength":1},"imagesFileIds":{"type":"array","items":{"type":"string","minLength":1}},"isComponent":{"type":"boolean"},"isStoryActive":{"type":"boolean"},"isArchived":{"default":false,"type":"boolean"},"createdForMe":{"type":"boolean"},"isCreatedForNetwork":{"default":false,"type":"boolean"},"include":{"type":"array","items":{"type":"string","enum":["material","bom","styleProperties","type","styleLink","tracingStory"]}},"companyId":{"type":"string"},"certValidationStandardId":{"type":"string"},"certValidationExpirationDate":{"type":"string"},"certValidationIssueDate":{"type":"string"},"updatedAfterUnixMs":{"type":"number"},"updatedBeforeUnixMs":{"type":"number"}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Retraced-generated unique identifier for this style. Format is a ULID prefixed with 'style_' on newer records; legacy records may use an unprefixed alphanumeric ID. Stable — safe to store and use as a foreign key."},"externalId":{"description":"Your own identifier for this product, if one was supplied on create. Null otherwise.","nullable":true,"type":"string"},"forCompanyId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"description":{"nullable":true,"type":"string","maxLength":4000},"gender":{"nullable":true,"type":"string","maxLength":50},"styleLevelId":{"type":"string","minLength":1,"description":"Retraced taxonomy identifier for the broad product level (e.g. APPAREL_END_CONSUMER_FINISHED_GOODS, FABRICS, TRIM_AND_ACCESSORIES). For the full list of valid values call GET /api/v2/style-types/ and read the parentId field."},"styleTypeId":{"type":"string","minLength":1},"productLevel":{"nullable":true,"type":"string"},"brands":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"departments":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"seasons":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"collections":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"claimIntentions":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"customProperties":{"nullable":true,"type":"string"},"suppliers":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"mainSupplier":{"nullable":true,"type":"string","minLength":1},"vendors":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"imagesFileIds":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"url":{"type":"string"},"previewUrl":{"type":"string"},"fileType":{"nullable":true,"type":"string"},"bucketName":{"type":"string"},"name":{"type":"string"},"fileSize":{"nullable":true,"type":"number"},"contentType":{"nullable":true,"type":"string"},"fileHash":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"createdBy":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByImpersonateName":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"}},"required":["id","url","previewUrl","fileType","bucketName","name","fileSize","contentType","fileHash","createdAt","updatedAt"],"additionalProperties":false}},"isComponent":{"anyOf":[{"type":"boolean"},{"type":"number"}]},"isStoryActive":{"description":"Whether the public traceability page (product story) is active for this product. Activating it requires tracing data (e.g. a supply chain) to be attached to the product first.","anyOf":[{"type":"boolean"},{"type":"number"}]},"isArchived":{"type":"boolean","description":"True if the product has been archived. Archived products are excluded from default API results."},"qrCodeUrl":{"nullable":true,"description":"URL of the product's pre-generated QR code image (an SVG hosted on the Retraced CDN). Null until generation completes, which happens asynchronously after the product is created. The QR image encodes a Retraced-managed forwarding URL that resolves to the product's traceability page once the story is active. The URL is stable once generated — it is not regenerated when product data changes.","type":"string"},"createdAt":{"nullable":true,"description":"ISO 8601 UTC timestamp of when the record was created.","type":"string","format":"date-time"},"updatedAt":{"nullable":true,"description":"ISO 8601 UTC timestamp of when the record was last modified. Use with updatedAfterUnixMs for incremental sync.","type":"string","format":"date-time"},"createdByImpersonateId":{"nullable":true,"type":"string","maxLength":36},"createdByUserId":{"nullable":true,"type":"string","maxLength":36},"createdByCompanyId":{"nullable":true,"type":"string","maxLength":36},"createdByApiKeyId":{"nullable":true,"type":"string","maxLength":36},"createdByApiKeyLabel":{"nullable":true,"type":"string","maxLength":255},"updatedByImpersonateId":{"nullable":true,"type":"string","maxLength":36},"updatedByUserId":{"nullable":true,"type":"string","maxLength":36},"updatedByCompanyId":{"nullable":true,"type":"string","maxLength":36},"updatedByApiKeyId":{"nullable":true,"type":"string","maxLength":36},"updatedByApiKeyLabel":{"nullable":true,"type":"string","maxLength":255},"ecoFootPrint":{"nullable":true,"type":"object","properties":{"syntheticMaterialPercentage":{"nullable":true,"type":"number","minimum":0,"maximum":100},"recycledMaterialPercentage":{"nullable":true,"type":"number","minimum":0,"maximum":100},"hazardousMaterials":{"nullable":true,"type":"array","items":{"type":"object","properties":{"idx":{"type":"number"},"name":{"type":"string","minLength":1},"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["idx","name","percentage"],"additionalProperties":false}},"recyclabilityAbsenceDisruptor":{"nullable":true,"type":"boolean"},"recyclabilityCanBeSorted":{"nullable":true,"type":"boolean"},"recyclabilityCanCollectAtScale":{"nullable":true,"type":"boolean"},"recyclabilityIndustrialScale":{"nullable":true,"type":"boolean"},"recyclabilityRate":{"nullable":true,"type":"number"}},"additionalProperties":false},"weight":{"nullable":true,"type":"object","properties":{"unit":{"type":"string"},"value":{"type":"number"}},"required":["unit","value"],"additionalProperties":false},"tracingStory":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"tracingType":{"type":"string"},"tracingId":{"type":"string"},"isActive":{"type":"boolean"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"tracingName":{"nullable":true,"type":"string"}},"required":["id","tracingType","tracingId","isActive","createdAt","updatedAt"],"additionalProperties":false},"isWeightAvailable":{"description":"True if a weight value has been recorded for this variant.","type":"boolean"},"featureImageUrl":{"nullable":true,"type":"string"},"material":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rawMaterialId":{"type":"string"},"rawMaterialName":{"type":"string"},"percentage":{"nullable":true,"type":"number"},"countriesOfOrigin":{"nullable":true,"type":"string"}},"required":["id","rawMaterialId","rawMaterialName","percentage","countriesOfOrigin"],"additionalProperties":false}}},"required":["id","name"],"additionalProperties":false},"bom":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"styleProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}},"required":["id","name","category"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}},"required":["id","name","category"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}},"required":["id","name","category"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}},"required":["id","name","category"],"additionalProperties":false}}},"additionalProperties":false},"type":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parentId":{"nullable":true,"type":"string"},"quantityUnits":{"nullable":true,"type":"array","items":{"type":"string"}},"weightUnits":{"nullable":true,"type":"array","items":{"type":"string"}}},"required":["id","name","parentId","quantityUnits","weightUnits"],"additionalProperties":false},"linkedStyles":{"type":"array","items":{"type":"object","properties":{"styleId":{"type":"string"}},"required":["styleId"],"additionalProperties":false}},"validationResult":{"type":"object","properties":{"valid":{"type":"boolean"},"selectable":{"type":"boolean"},"description":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false}}},"certificateDuplications":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"},"claimId":{"type":"string"}},"required":["type","text"],"additionalProperties":false}}},"required":["valid","selectable","description","certificateDuplications"],"additionalProperties":false}},"required":["id","forCompanyId","name","codes","styleLevelId","styleTypeId","isArchived"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/styles/export":{"post":{"tags":["Products/Styles"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"styleIds":{"default":[],"type":"array","items":{"type":"string"}},"isComponent":{"default":false,"type":"boolean"}}}}}},"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"exportId":{"type":"string"},"message":{"type":"string"}},"required":["exportId","message"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/styles/bulk-import":{"post":{"tags":["Products/Styles"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"styles":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"object","properties":{"styleCodes":{"default":[],"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1},"codeValue":{"type":"string","minLength":1}},"required":["codeId","codeValue"]}},"variantCodes":{"default":[],"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1},"codeValue":{"type":"string","minLength":1}},"required":["codeId","codeValue"]}},"skuCodes":{"default":[],"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1},"codeValue":{"type":"string","minLength":1}},"required":["codeId","codeValue"]}},"styleName":{"type":"string","minLength":1},"styleTypeId":{"default":"","type":"string"},"description":{"default":"","type":"string"},"brands":{"default":"","type":"string"},"departments":{"default":"","type":"string"},"seasons":{"default":"","type":"string"},"collections":{"default":"","type":"string"},"vendorId":{"default":"","type":"string"},"mainSupplierId":{"default":"","type":"string"},"supplierId":{"default":"","type":"string"},"rawMaterialId":{"default":"","type":"string"},"rawMaterialPercentage":{"default":null,"nullable":true,"type":"number"},"variantColor":{"default":"","type":"string"},"variantName":{"default":"","type":"string"},"size":{"default":"","type":"string"},"gender":{"default":"","type":"string"},"claimIntentions":{"default":"","type":"string"},"weight":{"default":"","type":"string"},"weightUnit":{"default":"","type":"string"},"supplyChainType":{"default":"","type":"string"},"supplyChainRef":{"default":"","type":"string"},"images":{"default":"","type":"string"}},"required":["styleName"]}},"isComponent":{"default":false,"type":"boolean"}},"required":["styles"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"bulkImportId":{"type":"string"},"message":{"type":"string"},"totalRows":{"type":"number"},"batchCount":{"type":"number"}},"required":["bulkImportId","message","totalRows","batchCount"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/styles/check-codes":{"post":{"tags":["Products/Styles"],"description":"Check styles by code values — returns lean style data for import validation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"codes":{"minItems":1,"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1},"codeValue":{"type":"string","minLength":1}},"required":["codeValue"]}},"companyId":{"type":"string","minLength":1},"isCreatedForNetwork":{"type":"boolean"}},"required":["codes","companyId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"forCompanyId":{"type":"string"},"matchedCodes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string"},"codeValue":{"type":"string"}},"required":["codeId","codeValue"],"additionalProperties":false}},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string"},"codeValue":{"type":"string"}},"required":["codeId","codeValue"],"additionalProperties":false}},"type":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"quantityUnits":{"nullable":true,"type":"array","items":{"type":"string"}}},"required":["id","name","quantityUnits"],"additionalProperties":false}},"required":["id","name","forCompanyId","matchedCodes","codes","type"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/style-links/link":{"post":{"tags":["StyleLinks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"toLinkStyleId":{"type":"string","minLength":1}},"required":["styleId","toLinkStyleId"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","name","forCompanyId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/style-types/list":{"post":{"tags":["Products/StyleTypes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"asc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"name","type":"string","enum":["name","createdAt","updatedAt"]},"name":{"type":"string"},"hierarchyLevel":{"type":"number"},"parentId":{"nullable":true,"type":"string"},"hasParentId":{"type":"boolean"},"isPrimary":{"type":"boolean"},"forCompanyId":{"type":"string"}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","maxLength":255},"parentId":{"nullable":true,"type":"string"},"quantityUnits":{"nullable":true,"type":"array","items":{"type":"string"}},"weightUnits":{"nullable":true,"type":"array","items":{"type":"string"}},"isWeightAvailable":{"nullable":true,"type":"boolean"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string","maxLength":4000},"hierarchyLevel":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string","maxLength":36},"createdByCompanyId":{"nullable":true,"type":"string","maxLength":36},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string","maxLength":36},"updatedByCompanyId":{"nullable":true,"type":"string","maxLength":36}},"required":["id","name","parentId","quantityUnits","weightUnits","isWeightAvailable","assetId","assetType","hierarchyLevel"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/style-variants/":{"post":{"tags":["Products/Variants"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"forCompanyId":{"type":"string","minLength":1},"styleId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"nullable":true,"type":"string","maxLength":4000},"codes":{"minItems":1,"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"]}},"color":{"type":"string","minLength":1,"maxLength":255},"gender":{"nullable":true,"type":"string","maxLength":50},"imagesFileIds":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"brands":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"departments":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"seasons":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"collections":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"customProperties":{"nullable":true,"type":"string"},"suppliers":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"mainSupplier":{"nullable":true,"type":"string","minLength":1},"vendors":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"claimIntentions":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"weight":{"nullable":true,"type":"object","properties":{"unit":{"nullable":true,"type":"string","enum":["GRAM","GRAM_PER_SQUARE_METER","GRAM_PER_SQUARE_FOOT","GRAM_PER_SQUARE_YARD","OUNCE_PER_SQUARE_YARD","MILLIGRAM","KILOGRAM","METRIC_TON","POUNDS","SHORT_TON","LONG_TON","HUNDREDWEIGHT","SHORT_HUNDREDWEIGHT","LONG_HUNDREDWEIGHT","OUNCE","DRAM","GRAIN","PENNYWEIGHT","SCRUPLE","STONE"]},"value":{"nullable":true,"type":"number"}},"required":["unit","value"]},"isStoryActive":{"type":"boolean"},"externalId":{"type":"string","minLength":1,"maxLength":255,"description":"Your own identifier for this product. Unique per company across all product levels. Can be used in place of the Retraced ID on any product ID field in this API. On update it is only written when the field is present in the body — omitting it keeps the stored value, sending null clears it."}},"required":["styleId","name","codes","color"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"$ref":"#/components/schemas/VariantSchema"}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/style-variants/{id}":{"put":{"tags":["Products/Variants"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"forCompanyId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"nullable":true,"type":"string","maxLength":4000},"codes":{"minItems":1,"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"]}},"color":{"type":"string","minLength":1,"maxLength":255},"gender":{"nullable":true,"type":"string","maxLength":50},"imagesFileIds":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"brands":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"departments":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"seasons":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"collections":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"customProperties":{"nullable":true,"type":"string"},"suppliers":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"mainSupplier":{"nullable":true,"type":"string","minLength":1},"vendors":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"claimIntentions":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"weight":{"nullable":true,"type":"object","properties":{"unit":{"nullable":true,"type":"string","enum":["GRAM","GRAM_PER_SQUARE_METER","GRAM_PER_SQUARE_FOOT","GRAM_PER_SQUARE_YARD","OUNCE_PER_SQUARE_YARD","MILLIGRAM","KILOGRAM","METRIC_TON","POUNDS","SHORT_TON","LONG_TON","HUNDREDWEIGHT","SHORT_HUNDREDWEIGHT","LONG_HUNDREDWEIGHT","OUNCE","DRAM","GRAIN","PENNYWEIGHT","SCRUPLE","STONE"]},"value":{"nullable":true,"type":"number"}},"required":["unit","value"]},"isStoryActive":{"type":"boolean"},"externalId":{"nullable":true,"type":"string","minLength":1,"maxLength":255,"description":"Your own identifier for this product. Unique per company across all product levels. Can be used in place of the Retraced ID on any product ID field in this API. On update it is only written when the field is present in the body — omitting it keeps the stored value, sending null clears it."}},"required":["name","codes","color"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"$ref":"#/components/schemas/VariantSchema"}},"required":["metadata","data"],"additionalProperties":false}}}}}},"get":{"tags":["Products/Variants"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"$ref":"#/components/schemas/VariantSchema"}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/style-variants/archive":{"post":{"tags":["Products/Variants"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"shouldUnarchiveChildren":{"default":true,"type":"boolean"}},"required":["ids"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/style-variants/unarchive":{"post":{"tags":["Products/Variants"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"shouldUnarchiveChildren":{"default":true,"type":"boolean"}},"required":["ids"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/style-variants/list":{"post":{"tags":["Products/Variants"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"createdAt","type":"string","enum":["createdAt","updatedAt","name","color","styleId","skuCount","typeName"]},"name":{"type":"string"},"codes":{"type":"object","properties":{"codeId":{"type":"string"},"codeValue":{"type":"string"}}},"color":{"type":"string"},"styleId":{"type":"string"},"styleLevelId":{"type":"string"},"styleTypeId":{"type":"string"},"brands":{"type":"array","items":{"type":"string","minLength":1}},"departments":{"type":"array","items":{"type":"string","minLength":1}},"seasons":{"type":"array","items":{"type":"string","minLength":1}},"collections":{"type":"array","items":{"type":"string","minLength":1}},"suppliers":{"type":"array","items":{"type":"string","minLength":1}},"mainSupplier":{"type":"string"},"vendors":{"type":"array","items":{"type":"string","minLength":1}},"imagesFileIds":{"type":"array","items":{"type":"string","minLength":1}},"overriddenFlag":{"type":"array","items":{"type":"string","minLength":1}},"isComponent":{"type":"boolean"},"isStoryActive":{"type":"boolean"},"isArchived":{"default":false,"type":"boolean"},"include":{"type":"array","items":{"type":"string","enum":["style","material","type","bom","skuCount","images","styleProperties","tracingStory"]}},"updatedAfterUnixMs":{"type":"number"},"updatedBeforeUnixMs":{"type":"number"},"companyId":{"type":"string"},"certValidationStandardId":{"type":"string"},"certValidationExpirationDate":{"type":"string"},"certValidationIssueDate":{"type":"string"}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"externalId":{"nullable":true,"type":"string"},"styleId":{"type":"string","minLength":1},"forCompanyId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"nullable":true,"type":"string","maxLength":4000},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"gender":{"nullable":true,"type":"string","maxLength":50},"styleLevelId":{"type":"string","minLength":1},"styleTypeId":{"type":"string","minLength":1},"color":{"type":"string","minLength":1,"maxLength":255},"imagesFileIds":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"featuredImage":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"url":{"nullable":true,"type":"string"},"previewUrl":{"nullable":true,"type":"string"},"fileType":{"nullable":true,"type":"string"},"bucketName":{"type":"string"},"name":{"type":"string"},"fileSize":{"nullable":true,"type":"number"},"contentType":{"nullable":true,"type":"string"},"fileHash":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"createdBy":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByImpersonateName":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"}},"required":["id","url","previewUrl","fileType","bucketName","name","fileSize","contentType","fileHash","createdAt","updatedAt","createdBy","createdByCompanyId","createdByImpersonateId","createdByImpersonateName","createdByUserId","createdByApiKeyId","createdByApiKeyLabel","updatedByUserId","updatedByUserName","updatedByCompanyId","updatedByCompanyName","updatedByImpersonateId","updatedByImpersonateName","updatedByApiKeyId","updatedByApiKeyLabel"],"additionalProperties":false},"brands":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"departments":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"seasons":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"collections":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"customProperties":{"nullable":true,"type":"string"},"suppliers":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"mainSupplier":{"nullable":true,"type":"string","minLength":1},"vendors":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"claimIntentions":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"weight":{"nullable":true,"type":"object","properties":{"unit":{"type":"string"},"value":{"type":"number"}},"required":["unit","value"],"additionalProperties":false},"overriddenFlag":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"isComponent":{"anyOf":[{"type":"boolean"},{"type":"number"}]},"isStoryActive":{"anyOf":[{"type":"boolean"},{"type":"number"}]},"isArchived":{"type":"boolean"},"skuCount":{"type":"number"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"createdByImpersonateId":{"nullable":true,"type":"string","maxLength":36},"createdByUserId":{"nullable":true,"type":"string","maxLength":36},"createdByCompanyId":{"nullable":true,"type":"string","maxLength":36},"createdByApiKeyId":{"nullable":true,"type":"string","maxLength":36},"createdByApiKeyLabel":{"nullable":true,"type":"string","maxLength":255},"updatedByImpersonateId":{"nullable":true,"type":"string","maxLength":36},"updatedByUserId":{"nullable":true,"type":"string","maxLength":36},"updatedByCompanyId":{"nullable":true,"type":"string","maxLength":36},"updatedByApiKeyId":{"nullable":true,"type":"string","maxLength":36},"updatedByApiKeyLabel":{"nullable":true,"type":"string","maxLength":255},"qrCodeUrl":{"nullable":true,"description":"URL of the product's pre-generated QR code image (an SVG hosted on the Retraced CDN). Null until generation completes, which happens asynchronously after the product is created. The QR image encodes a Retraced-managed forwarding URL that resolves to the product's traceability page once the story is active. The URL is stable once generated — it is not regenerated when product data changes.","type":"string"},"tracingStory":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"tracingType":{"type":"string"},"tracingId":{"type":"string"},"isActive":{"type":"boolean"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"tracingName":{"nullable":true,"type":"string"}},"required":["id","tracingType","tracingId","isActive","createdAt","updatedAt"],"additionalProperties":false},"isWeightAvailable":{"type":"boolean"},"featureImageUrl":{"nullable":true,"type":"string"},"style":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"imagesFileIds":{"nullable":true,"type":"array","items":{"type":"string"}},"isComponent":{"type":"boolean"}},"required":["id","name","description","imagesFileIds","isComponent"],"additionalProperties":false},"material":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rawMaterialId":{"type":"string"},"rawMaterialName":{"type":"string"},"percentage":{"nullable":true,"type":"number"},"countriesOfOrigin":{"nullable":true,"type":"string"}},"required":["id","rawMaterialId","rawMaterialName","percentage","countriesOfOrigin"],"additionalProperties":false}}},"required":["id","name"],"additionalProperties":false},"type":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parentId":{"nullable":true,"type":"string"},"hierarchyLevel":{"nullable":true,"type":"number"}},"required":["id","name","parentId","hierarchyLevel"],"additionalProperties":false},"bom":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"styleId":{"type":"string"}},"required":["id","name","styleId"],"additionalProperties":false}},"styleProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}},"required":["id","name","category"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}},"required":["id","name","category"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}},"required":["id","name","category"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}},"required":["id","name","category"],"additionalProperties":false}}},"additionalProperties":false},"validationResult":{"type":"object","properties":{"valid":{"type":"boolean"},"selectable":{"type":"boolean"},"description":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false}}},"certificateDuplications":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"},"claimId":{"type":"string"}},"required":["type","text"],"additionalProperties":false}}},"required":["valid","selectable","description","certificateDuplications"],"additionalProperties":false}},"required":["id","styleId","forCompanyId","name","codes","styleLevelId","styleTypeId","color","isArchived"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/style-properties/":{"post":{"summary":"Create a Style Property","tags":["Products/StyleProperties"],"description":"Creates a new style property for the authenticated company. Style properties are predefined values for the brands, seasons, collections, and departments fields. A property must be created here before its id can be referenced on a style. The category field determines which field the property applies to.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":255},"category":{"type":"string","enum":["collections","departments","seasons","brands"]}},"required":["value","category"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"$ref":"#/components/schemas/StylePropertySchema"}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/style-properties/list":{"post":{"tags":["Products/StyleProperties"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"value","type":"string","enum":["value","category","createdAt","updatedAt","createdByUserId","updatedByUserId"]},"companyId":{"type":"string"},"category":{"type":"string","enum":["collections","departments","seasons","brands"]}},"required":["companyId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"forCompanyId":{"type":"string","minLength":1},"value":{"nullable":true,"type":"string","maxLength":255},"category":{"type":"string","enum":["collections","departments","seasons","brands"]},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"createdByImpersonateId":{"nullable":true,"type":"string","maxLength":36},"createdByUserId":{"nullable":true,"type":"string","maxLength":36},"createdByCompanyId":{"nullable":true,"type":"string","maxLength":36},"createdByApiKeyId":{"nullable":true,"type":"string","maxLength":36},"createdByApiKeyLabel":{"nullable":true,"type":"string","maxLength":255},"updatedByImpersonateId":{"nullable":true,"type":"string","maxLength":36},"updatedByUserId":{"nullable":true,"type":"string","maxLength":36},"updatedByCompanyId":{"nullable":true,"type":"string","maxLength":36},"updatedByApiKeyId":{"nullable":true,"type":"string","maxLength":36},"updatedByApiKeyLabel":{"nullable":true,"type":"string","maxLength":255}},"required":["id","forCompanyId","value","category"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/variant-skus/":{"post":{"tags":["Products/Variant-SKUs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"variantId":{"type":"string","minLength":1},"forCompanyId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"nullable":true,"type":"string","maxLength":4000},"dimension":{"type":"string","minLength":1,"maxLength":255},"gender":{"nullable":true,"type":"string","maxLength":50},"codes":{"minItems":1,"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"]}},"imagesFileIds":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"brands":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"departments":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"seasons":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"collections":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"customProperties":{"nullable":true,"type":"string"},"suppliers":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"mainSupplier":{"nullable":true,"type":"string","minLength":1},"vendors":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"claimIntentions":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"weight":{"nullable":true,"type":"object","properties":{"unit":{"nullable":true,"type":"string","enum":["GRAM","GRAM_PER_SQUARE_METER","GRAM_PER_SQUARE_FOOT","GRAM_PER_SQUARE_YARD","OUNCE_PER_SQUARE_YARD","MILLIGRAM","KILOGRAM","METRIC_TON","POUNDS","SHORT_TON","LONG_TON","HUNDREDWEIGHT","SHORT_HUNDREDWEIGHT","LONG_HUNDREDWEIGHT","OUNCE","DRAM","GRAIN","PENNYWEIGHT","SCRUPLE","STONE"]},"value":{"nullable":true,"type":"number"}},"required":["unit","value"]},"isStoryActive":{"type":"boolean"},"externalId":{"type":"string","minLength":1,"maxLength":255,"description":"Your own identifier for this product. Unique per company across all product levels. Can be used in place of the Retraced ID on any product ID field in this API. On update it is only written when the field is present in the body — omitting it keeps the stored value, sending null clears it."}},"required":["variantId","name","dimension","codes"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"$ref":"#/components/schemas/SkuSchema"}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/variant-skus/list":{"post":{"tags":["Products/Variant-SKUs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"createdAt","type":"string","enum":["createdAt","updatedAt","name","dimension","variantId","typeName"]},"variantIds":{"type":"array","items":{"type":"string","minLength":1}},"name":{"type":"string"},"dimension":{"type":"string"},"codes":{"type":"object","properties":{"codeId":{"type":"string"},"codeValue":{"type":"string"}}},"brands":{"type":"array","items":{"type":"string","minLength":1}},"departments":{"type":"array","items":{"type":"string","minLength":1}},"seasons":{"type":"array","items":{"type":"string","minLength":1}},"collections":{"type":"array","items":{"type":"string","minLength":1}},"suppliers":{"type":"array","items":{"type":"string","minLength":1}},"mainSupplier":{"type":"string"},"vendors":{"type":"array","items":{"type":"string","minLength":1}},"claimIntentions":{"type":"array","items":{"type":"string","minLength":1}},"isComponent":{"type":"boolean"},"isStoryActive":{"type":"boolean"},"isArchived":{"default":false,"type":"boolean"},"styleLevelId":{"type":"string"},"styleTypeId":{"type":"string"},"styleIds":{"type":"array","items":{"type":"string","minLength":1}},"include":{"type":"array","items":{"type":"string","enum":["type","material","bom","images","style","variant","styleProperties","tracingStory"]}},"updatedAfterUnixMs":{"type":"number"},"updatedBeforeUnixMs":{"type":"number"},"companyId":{"type":"string"},"certValidationStandardId":{"type":"string"},"certValidationExpirationDate":{"type":"string"},"certValidationIssueDate":{"type":"string"}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"externalId":{"nullable":true,"type":"string"},"variantId":{"type":"string","minLength":1},"styleId":{"type":"string","minLength":1},"forCompanyId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"nullable":true,"type":"string","maxLength":4000},"dimension":{"nullable":true,"type":"string","minLength":1,"maxLength":255},"gender":{"nullable":true,"type":"string","maxLength":50},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"styleLevelId":{"type":"string","minLength":1},"styleTypeId":{"type":"string","minLength":1},"color":{"nullable":true,"type":"string","minLength":1,"maxLength":255},"imagesFileIds":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"brands":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"departments":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"seasons":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"collections":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"customProperties":{"nullable":true,"type":"string"},"suppliers":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"mainSupplier":{"nullable":true,"type":"string","minLength":1},"vendors":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"claimIntentions":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"weight":{"nullable":true,"type":"object","properties":{"unit":{"type":"string"},"value":{"type":"number"}},"required":["unit","value"],"additionalProperties":false},"overriddenFlag":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"isComponent":{"type":"boolean"},"isStoryActive":{"type":"boolean","description":"Whether the public traceability page (product story) is active for this product. Activating it requires tracing data (e.g. a supply chain) to be attached to the product first."},"isArchived":{"type":"boolean"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"createdByImpersonateId":{"nullable":true,"type":"string","maxLength":36},"createdByUserId":{"nullable":true,"type":"string","maxLength":36},"createdByCompanyId":{"nullable":true,"type":"string","maxLength":36},"createdByApiKeyId":{"nullable":true,"type":"string","maxLength":36},"createdByApiKeyLabel":{"nullable":true,"type":"string","maxLength":255},"updatedByImpersonateId":{"nullable":true,"type":"string","maxLength":36},"updatedByUserId":{"nullable":true,"type":"string","maxLength":36},"updatedByCompanyId":{"nullable":true,"type":"string","maxLength":36},"updatedByApiKeyId":{"nullable":true,"type":"string","maxLength":36},"updatedByApiKeyLabel":{"nullable":true,"type":"string","maxLength":255},"featuredImage":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"url":{"nullable":true,"type":"string"},"previewUrl":{"nullable":true,"type":"string"},"fileType":{"nullable":true,"type":"string"},"name":{"type":"string"},"contentType":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","url","previewUrl","fileType","name","contentType","createdAt","updatedAt"],"additionalProperties":false},"qrCodeUrl":{"nullable":true,"description":"URL of the product's pre-generated QR code image (an SVG hosted on the Retraced CDN). Null until generation completes, which happens asynchronously after the product is created. The QR image encodes a Retraced-managed forwarding URL that resolves to the product's traceability page once the story is active. The URL is stable once generated — it is not regenerated when product data changes.","type":"string"},"tracingStory":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"tracingType":{"type":"string"},"tracingId":{"type":"string"},"isActive":{"type":"boolean"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"tracingName":{"nullable":true,"type":"string"}},"required":["id","tracingType","tracingId","isActive","createdAt","updatedAt"],"additionalProperties":false},"isWeightAvailable":{"type":"boolean"},"featureImageUrl":{"nullable":true,"type":"string"},"type":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parentId":{"nullable":true,"type":"string"},"hierarchyLevel":{"nullable":true,"type":"number"}},"required":["id","name","parentId","hierarchyLevel"],"additionalProperties":false},"material":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rawMaterialId":{"type":"string"},"rawMaterialName":{"type":"string"},"percentage":{"nullable":true,"type":"number"},"countriesOfOrigin":{"nullable":true,"type":"string"}},"required":["id","rawMaterialId","rawMaterialName","percentage","countriesOfOrigin"],"additionalProperties":false}}},"required":["id","name"],"additionalProperties":false},"bom":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"styleId":{"type":"string"}},"required":["id","name","styleId"],"additionalProperties":false}},"style":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"imagesFileIds":{"nullable":true,"type":"array","items":{"type":"string"}},"isComponent":{"type":"boolean"}},"required":["id","name","description","imagesFileIds","isComponent"],"additionalProperties":false},"variant":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"codes":{"type":"array","items":{"type":"string"}},"color":{"type":"string"},"imagesFileIds":{"nullable":true,"type":"array","items":{"type":"string"}},"isComponent":{"type":"boolean"}},"required":["id","name","codes","color","imagesFileIds","isComponent"],"additionalProperties":false},"styleProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}},"required":["id","name","category"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}},"required":["id","name","category"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}},"required":["id","name","category"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}},"required":["id","name","category"],"additionalProperties":false}}},"additionalProperties":false},"validationResult":{"type":"object","properties":{"valid":{"type":"boolean"},"selectable":{"type":"boolean"},"description":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false}}},"certificateDuplications":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"},"claimId":{"type":"string"}},"required":["type","text"],"additionalProperties":false}}},"required":["valid","selectable","description","certificateDuplications"],"additionalProperties":false}},"required":["id","variantId","forCompanyId","name","dimension","codes","styleLevelId","styleTypeId","color","isComponent","isStoryActive","isArchived"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/variant-skus/{id}":{"put":{"tags":["Products/Variant-SKUs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"forCompanyId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"nullable":true,"type":"string","maxLength":4000},"dimension":{"type":"string","minLength":1,"maxLength":255},"gender":{"nullable":true,"type":"string","maxLength":50},"codes":{"minItems":1,"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"]}},"imagesFileIds":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"brands":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"departments":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"seasons":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"collections":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"customProperties":{"nullable":true,"type":"string"},"suppliers":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"mainSupplier":{"nullable":true,"type":"string","minLength":1},"vendors":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"claimIntentions":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"weight":{"nullable":true,"type":"object","properties":{"unit":{"nullable":true,"type":"string","enum":["GRAM","GRAM_PER_SQUARE_METER","GRAM_PER_SQUARE_FOOT","GRAM_PER_SQUARE_YARD","OUNCE_PER_SQUARE_YARD","MILLIGRAM","KILOGRAM","METRIC_TON","POUNDS","SHORT_TON","LONG_TON","HUNDREDWEIGHT","SHORT_HUNDREDWEIGHT","LONG_HUNDREDWEIGHT","OUNCE","DRAM","GRAIN","PENNYWEIGHT","SCRUPLE","STONE"]},"value":{"nullable":true,"type":"number"}},"required":["unit","value"]},"isStoryActive":{"type":"boolean"},"externalId":{"nullable":true,"type":"string","minLength":1,"maxLength":255,"description":"Your own identifier for this product. Unique per company across all product levels. Can be used in place of the Retraced ID on any product ID field in this API. On update it is only written when the field is present in the body — omitting it keeps the stored value, sending null clears it."}},"required":["name","dimension","codes"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"$ref":"#/components/schemas/SkuSchema"}},"required":["metadata","data"],"additionalProperties":false}}}}}},"get":{"tags":["Products/Variant-SKUs"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"$ref":"#/components/schemas/SkuSchema"}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/variant-skus/archive":{"post":{"tags":["Products/Variant-SKUs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["ids"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/variant-skus/unarchive":{"post":{"tags":["Products/Variant-SKUs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["ids"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/material-headers/":{"post":{"tags":["Products/Material-Headers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"nullable":true,"type":"string","maxLength":4000},"link":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"isMainMaterial":{"type":"boolean"}},"required":["styleId","isMainMaterial"]},"forCompanyId":{"type":"string","minLength":1}},"required":["name","link"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"forCompanyId":{"type":"string","minLength":1},"description":{"nullable":true,"type":"string","maxLength":4000},"link":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"isMainMaterial":{"type":"boolean"},"isOwner":{"type":"boolean"}},"required":["styleId","isMainMaterial"],"additionalProperties":false},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"}},"required":["id","name","forCompanyId","link"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/material-headers/{id}":{"get":{"tags":["Products/Material-Headers"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"forCompanyId":{"type":"string","minLength":1},"description":{"nullable":true,"type":"string","maxLength":4000},"link":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"isMainMaterial":{"type":"boolean"},"isOwner":{"type":"boolean"}},"required":["styleId","isMainMaterial"],"additionalProperties":false},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"}},"required":["id","name","forCompanyId","link"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}},"put":{"tags":["Products/Material-Headers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"nullable":true,"type":"string","maxLength":4000},"link":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"isMainMaterial":{"type":"boolean"}},"required":["styleId","isMainMaterial"]},"forCompanyId":{"type":"string","minLength":1}},"required":["name","link"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"forCompanyId":{"type":"string","minLength":1},"description":{"nullable":true,"type":"string","maxLength":4000},"link":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"isMainMaterial":{"type":"boolean"},"isOwner":{"type":"boolean"}},"required":["styleId","isMainMaterial"],"additionalProperties":false},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"}},"required":["id","name","forCompanyId","link"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/material-headers/list":{"post":{"tags":["Products/Material-Headers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"name","type":"string","enum":["name","styleId","createdAt","updatedAt"]},"styleId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"isMainMaterial":{"type":"boolean"},"isOwner":{"type":"boolean"}},"required":["styleId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"forCompanyId":{"type":"string","minLength":1},"description":{"nullable":true,"type":"string","maxLength":4000},"link":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"isMainMaterial":{"type":"boolean"},"isOwner":{"type":"boolean"}},"required":["styleId","isMainMaterial"],"additionalProperties":false},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"}},"required":["id","name","forCompanyId","link"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/material-headers/delete":{"post":{"tags":["Products/Material-Headers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"materialHeaderIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["styleId","materialHeaderIds"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"deletedHeaders":{"type":"array","items":{"type":"string"}},"deletedLinks":{"type":"array","items":{"type":"string"}},"errors":{"type":"array","items":{"type":"object","properties":{"materialHeaderId":{"type":"string"},"message":{"type":"string"}},"required":["materialHeaderId","message"],"additionalProperties":false}}},"required":["deletedHeaders","deletedLinks","errors"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/material-lines/":{"post":{"tags":["Products/Material-Lines"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"materialHeaderId":{"type":"string","minLength":1},"parentId":{"nullable":true,"type":"string"},"percentage":{"type":"number","minimum":0,"maximum":100},"rawMaterialId":{"type":"string","minLength":1},"weights":{"type":"number","minimum":0},"weightUnit":{"type":"string","maxLength":255},"level":{"type":"integer","minimum":0,"maximum":9007199254740991},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"countriesOfOrigin":{"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"forCompanyId":{"type":"string","minLength":1}},"required":["styleId","materialHeaderId","percentage","rawMaterialId"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"materialHeaderId":{"type":"string"},"rawMaterialId":{"nullable":true,"type":"string"},"percentage":{"nullable":true,"type":"number"},"weights":{"nullable":true,"type":"number"},"weightUnit":{"nullable":true,"type":"string"},"parentId":{"nullable":true,"type":"string"},"hierarchy":{"nullable":true,"type":"number"},"position":{"nullable":true,"type":"number"},"countriesOfOrigin":{"nullable":true,"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"}},"required":["id","materialHeaderId","rawMaterialId","percentage","weights","weightUnit","parentId","hierarchy","position","countriesOfOrigin","createdAt","createdByUserId","createdByCompanyId","updatedAt","updatedByUserId","updatedByCompanyId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/material-lines/delete":{"post":{"tags":["Products/Material-Lines"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"materialLineIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"styleId":{"type":"string","minLength":1}},"required":["materialLineIds","styleId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"deletedLines":{"type":"array","items":{"type":"string"},"description":"IDs of successfully deleted material lines"},"duplicatedHeaders":{"type":"array","items":{"type":"object","properties":{"originalHeaderId":{"type":"string"},"newHeaderId":{"type":"string"},"forEntityId":{"type":"string"},"entityType":{"type":"string","enum":["style","variant","sku"]}},"required":["originalHeaderId","newHeaderId","forEntityId","entityType"],"additionalProperties":false},"description":"Details of headers that were duplicated for child entities"},"orphanedHeaders":{"type":"array","items":{"type":"string"},"description":"IDs of headers that were cleaned up"},"errors":{"type":"array","items":{"type":"object","properties":{"materialLineId":{"type":"string"},"message":{"type":"string"}},"required":["materialLineId","message"],"additionalProperties":false},"description":"Errors encountered during deletion process"}},"required":["deletedLines","duplicatedHeaders","orphanedHeaders","errors"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/material-lines/list":{"post":{"tags":["Products/Material-Lines"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"materialHeaderId","type":"string","enum":["materialHeaderId","rawMaterialId","percentage","hierarchy","position","createdAt","updatedAt"]},"materialHeaderId":{"type":"string","minLength":1},"rawMaterialId":{"type":"string","minLength":1},"parentId":{"type":"string","minLength":1},"countriesOfOrigin":{"type":"string","minLength":1},"include":{"type":"array","items":{"type":"string","enum":["rawMaterials","countriesOfOrigin"]}}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"materialHeaderId":{"type":"string"},"rawMaterialId":{"nullable":true,"type":"string"},"percentage":{"nullable":true,"type":"number"},"weights":{"nullable":true,"type":"number"},"weightUnit":{"nullable":true,"type":"string"},"parentId":{"nullable":true,"type":"string"},"hierarchy":{"nullable":true,"type":"number"},"position":{"nullable":true,"type":"number"},"countriesOfOrigin":{"nullable":true,"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"rawMaterial":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"category":{"nullable":true,"type":"string"},"isRecycled":{"nullable":true,"type":"boolean"},"isSynthetic":{"nullable":true,"type":"boolean"}},"required":["id","name","description","category","isRecycled","isSynthetic"],"additionalProperties":false},"countries":{"type":"array","items":{"type":"object","properties":{"countryCode":{"type":"string"},"countryName":{"type":"string"},"countryNameLocale":{"type":"string"},"region":{"type":"string"},"currencyCode":{"nullable":true,"type":"string"},"currencyName":{"nullable":true,"type":"string"}},"required":["countryCode","countryName","countryNameLocale","region","currencyCode","currencyName"],"additionalProperties":false}}},"required":["id","materialHeaderId","rawMaterialId","percentage","weights","weightUnit","parentId","hierarchy","position","countriesOfOrigin","createdAt","createdByUserId","createdByCompanyId","updatedAt","updatedByUserId","updatedByCompanyId"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/material-lines/{id}":{"put":{"tags":["Products/Material-Lines"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"materialHeaderId":{"type":"string","minLength":1},"parentId":{"nullable":true,"type":"string"},"percentage":{"type":"number","minimum":0,"maximum":100},"rawMaterialId":{"type":"string","minLength":1},"weights":{"type":"number","minimum":0},"weightUnit":{"type":"string","maxLength":255},"level":{"type":"integer","minimum":0,"maximum":9007199254740991},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"countriesOfOrigin":{"type":"array","items":{"type":"string","minLength":2,"maxLength":2}}},"required":["styleId","materialHeaderId","percentage","rawMaterialId"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"materialHeaderId":{"type":"string"},"rawMaterialId":{"nullable":true,"type":"string"},"percentage":{"nullable":true,"type":"number"},"weights":{"nullable":true,"type":"number"},"weightUnit":{"nullable":true,"type":"string"},"parentId":{"nullable":true,"type":"string"},"hierarchy":{"nullable":true,"type":"number"},"position":{"nullable":true,"type":"number"},"countriesOfOrigin":{"nullable":true,"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"}},"required":["id","materialHeaderId","rawMaterialId","percentage","weights","weightUnit","parentId","hierarchy","position","countriesOfOrigin","createdAt","createdByUserId","createdByCompanyId","updatedAt","updatedByUserId","updatedByCompanyId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/style-type-field-values/upsert":{"post":{"tags":["Products/StyleTypeFieldValues"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"styleTypeId":{"type":"string","minLength":1},"fieldValues":{"minItems":1,"type":"array","items":{"type":"object","properties":{"styleTypeFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string","enum":["SELECT","SHORT_TEXT","LONG_TEXT","NUMBER","NUMBER_UOM","NUMBER_UOM_TEXT","DATE_RANGE","YEAR_PICKER","TEXT","MULTI_SELECT","DATE","CHECKBOX"]},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}}},{"type":"array","items":{"type":"string"}},{"type":"string","nullable":true,"enum":[null]}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"idx":{"nullable":true,"type":"number"}},"required":["styleTypeFieldId","fieldName","fieldType"]}}},"required":["styleId","styleTypeId","fieldValues"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"nullable":true,"type":"string"},"styleTypeFieldId":{"type":"string"},"forCompanyId":{"type":"string"},"styleId":{"type":"string"},"styleTypeId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false},{"type":"array","items":{"type":"string"}},{"type":"string","nullable":true,"enum":[null]}]},"idx":{"nullable":true,"type":"number"},"fieldOptions":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"standardFieldName":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","styleTypeFieldId","forCompanyId","styleId","styleTypeId","fieldName","fieldType","createdAt"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/style-type-field-values/entity":{"get":{"tags":["Products/StyleTypeFieldValues"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"styleId","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"entityId","required":false},{"schema":{"type":"string"},"in":"query","name":"entityName","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"nullable":true,"type":"string"},"styleTypeFieldId":{"type":"string"},"forCompanyId":{"type":"string"},"styleId":{"type":"string"},"styleTypeId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false},{"type":"array","items":{"type":"string"}},{"type":"string","nullable":true,"enum":[null]}]},"idx":{"nullable":true,"type":"number"},"fieldOptions":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"standardFieldName":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","styleTypeFieldId","forCompanyId","styleId","styleTypeId","fieldName","fieldType","createdAt"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/status":{"get":{"tags":["Status"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"version":{"type":"string"},"dbTime":{"type":"string"}},"required":["version","dbTime"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/":{"post":{"tags":["Company Chains"],"description":"Create company supply chain","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"supplyChainName":{"type":"string","minLength":1},"facilityProcesses":{"minItems":1,"type":"array","items":{"type":"object","properties":{"facilityProcessId":{"type":"string"},"facilityProcessName":{"type":"string"}},"additionalProperties":{}}}},"required":["supplyChainName","facilityProcesses"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"parentCollaborationId":{"type":"string","nullable":true,"enum":[null]},"supplyChainStatus":{"type":"string"},"supplyChainId":{"type":"string"},"companyId":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"type":"string"},"invitedByCompanyId":{"type":"string"},"message":{"type":"string","nullable":true,"enum":[null]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string"},"collaboratingNodeId":{"type":"string"},"collaboratingSupplyChainName":{"type":"string"}},"required":["id","parentCollaborationId","supplyChainStatus","supplyChainId","companyId","collaborationType","collaborationStatus","invitedByCompanyId","message","collaboratingNodeId","collaboratingSupplyChainName"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/export":{"post":{"tags":["Company Chains"],"description":"Records bulk supply chain export requests.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"collaborationIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":36}}},"required":["collaborationIds"]}}}},"responses":{"201":{"description":"Export requests recorded","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"Export requests recorded"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/{collaborationId}/duplicate":{"post":{"tags":["Company Chains"],"description":"Duplicate a company chain","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"collaborationId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"collaboratingSupplyChainName":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"displayName":{"nullable":true,"type":"string"}},"required":["id","collaboratingSupplyChainName","createdByCompanyId","updatedAt","displayName"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/collaborations":{"get":{"tags":["Company Chains"],"description":"Get company chain list","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":15,"type":"integer","minimum":0,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"sort","required":false},{"schema":{"type":"string"},"in":"query","name":"isArchived","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"supplyChainId":{"nullable":true,"type":"string"},"collaborationId":{"type":"string"},"collaboratingSupplyChainName":{"type":"string"},"supplyChainStatus":{"type":"string"},"mappingDepth":{"nullable":true,"type":"string"},"numberOfMappedCompanies":{"type":"number"},"numberOfCollaborators":{"type":"number"},"collaborationRights":{"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"createdByCompanyId":{"type":"string"},"createdByCompanyName":{"type":"string"},"createdByUserId":{"type":"string"},"createdAt":{"type":"string"},"isArchived":{"type":"number"},"collaboratorCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"type":"string"},"tags":{},"count":{"type":"number"}},"required":["supplyChainId","collaborationId","collaboratingSupplyChainName","supplyChainStatus","mappingDepth","numberOfMappedCompanies","numberOfCollaborators","collaborationRights","updatedAt","createdByCompanyId","createdByCompanyName","createdByUserId","createdAt","isArchived","collaboratorCompanyId","updatedByCompanyId","updatedByUserId","updatedByCompanyName","count"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"number"},"pageSize":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/{collaborationId}/companies":{"get":{"tags":["Company Chains"],"description":"List invitees company details","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":15,"type":"integer","minimum":0,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"collaborationRights","required":false},{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"collaborationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"tier":{"type":"string"},"companyId":{"type":"string"},"officialName":{"type":"string"},"companyName":{"type":"string"},"parentCompanyName":{"type":"string"},"nodeId":{"type":"string"},"imageList":{"type":"array","items":{}},"country":{"type":"string"},"countryName":{"type":"string"},"connectionType":{"type":"string"},"retracedRiskScore":{"type":"string"},"productTypes":{"type":"string"},"relationshipType":{"type":"string"},"collaborationStatus":{"type":"string"},"city":{"type":"string"},"collaborationStartDate":{"type":"string"},"facilityProcesses":{"type":"array","items":{"type":"object","properties":{"facilityProcessId":{"type":"string"},"facilityProcessName":{"type":"string"}},"additionalProperties":false}},"addedAt":{"type":"string"},"linkedBy":{"type":"string"},"totalUsersCount":{"type":"number"},"activeUsersCount":{"type":"number"},"invitedUsersCount":{"type":"number"},"count":{"type":"number"},"canInvite":{"type":"boolean"},"reasonCode":{"type":"string","enum":["ALREADY-INVITED","ALREADY-COLLABORATING","ZERO-USER-COUNT"]}},"required":["tier","companyId","officialName","companyName","parentCompanyName","nodeId","imageList","country","countryName","connectionType","retracedRiskScore","productTypes","relationshipType","collaborationStatus","city","collaborationStartDate","facilityProcesses","addedAt","linkedBy","totalUsersCount","activeUsersCount","invitedUsersCount","count","canInvite"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"number"},"pageSize":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/mapped-companies":{"get":{"tags":["Company Profiles"],"description":"Get mapped suppliers from supply chain network","parameters":[{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"type":"integer","minimum":0,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"sort","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"count":{"type":"number"},"supplyChainsCount":{"type":"number"},"facilityProcesses":{"type":"array","items":{"type":"object","properties":{"facilityProcessId":{"type":"string"},"facilityProcessName":{"type":"string"}},"additionalProperties":false}},"facilityProcessCount":{"type":"number"},"mappedByCount":{"type":"number"},"createdByCompaniesList":{"type":"array","items":{"type":"string"}},"displayName":{"type":"string"},"officialName":{"type":"string"},"country":{"type":"string"},"countryName":{"type":"string"},"connectionType":{"type":"string"}},"required":["companyId","count","supplyChainsCount","facilityProcessCount","mappedByCount","createdByCompaniesList","displayName","officialName","country","countryName","connectionType"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"number"},"pageSize":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/history":{"get":{"tags":["Company Chains"],"description":"List supply chain history","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":15,"type":"integer","minimum":0,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"sort","required":false},{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"query","name":"collaborationId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"action":{"type":"string"},"actionByCompanyId":{"type":"string"},"actionByCompanyName":{"type":"string"},"actionByUserId":{"type":"string"},"createdAt":{"type":"string"},"details":{"type":"object","properties":{"companies":{"type":"object","properties":{"from":{"anyOf":[{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"companyName":{"type":"string"}},"additionalProperties":false}}]},"to":{"anyOf":[{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"companyName":{"type":"string"}},"additionalProperties":false}}]}},"additionalProperties":false},"facilityProcesses":{"type":"object","properties":{"from":{"type":"array","items":{"type":"object","properties":{"facilityProcessId":{"type":"string"},"facilityProcessName":{"type":"string"}},"additionalProperties":false}},"to":{"type":"array","items":{"type":"object","properties":{"facilityProcessId":{"type":"string"},"facilityProcessName":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"collaborationId":{"type":"string"},"collaborationName":{"type":"string"}},"required":["action","actionByCompanyId","actionByUserId","createdAt","details","collaborationName"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"number"},"pageSize":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/nodes/{nodeId}/unmapped-company-profiles":{"get":{"tags":["Company Chains"],"description":"Get company profiles from network which are unmapped","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":15,"type":"integer","minimum":0,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"sort","required":false},{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"nodeId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"officialName":{"type":"string"},"companyName":{"type":"string"},"retracedRiskScore":{"type":"number"},"country":{"type":"string"},"countryName":{"type":"string"},"city":{"type":"string"},"connectionType":{"type":"string"},"collaborationStartDate":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true,"type":"string"},"supplyChainTier":{"type":"array","items":{}},"facilityProcesses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false}}},"required":["companyId"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"number"},"pageSize":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/reuse":{"patch":{"tags":["Company Chains"],"description":"Re-use a supply chain","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"targetNodeId":{"type":"string","minLength":1,"maxLength":36},"targetCollaborationId":{"type":"string","minLength":1,"maxLength":36},"sourceCollaborationId":{"type":"string","minLength":1,"maxLength":36},"removeRootNode":{"type":"boolean"}},"required":["targetNodeId","sourceCollaborationId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"supplyChainId":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"collaborationType":{"nullable":true,"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"createdByUserId":{"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"type":"string"},"updatedByCompanyId":{"type":"string"},"collaboratingNodeId":{"nullable":true,"type":"string"}},"required":["id","supplyChainId","companyId","collaborationType","collaborationStatus","invitedByCompanyId","createdAt","updatedAt","createdByUserId","updatedByUserId","createdByCompanyId","updatedByCompanyId","collaboratingNodeId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/supplier-statistics/":{"get":{"tags":["Supplier Statistics"],"description":"Get Overall Supplier Statistics","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"numberOfCollaborators":{"type":"number"},"numberOfSupplyChainsCreated":{"type":"number"},"totalNumberOfSuppliers":{"type":"number"},"totalNumberOfFacilityProcesses":{"type":"number"},"numberOfExcludedSupplier":{"type":"number"},"numberOfExclusiveSupplier":{"type":"number"},"totalNumberOfCompanies":{"type":"number"}},"required":["numberOfCollaborators","numberOfSupplyChainsCreated","totalNumberOfSuppliers","totalNumberOfFacilityProcesses","numberOfExcludedSupplier","numberOfExclusiveSupplier","totalNumberOfCompanies"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/critical-suppliers-statistics/":{"get":{"tags":["Supplier Statistics"],"description":"Get critical supplier statistics","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"supplierId":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"noOfSupplyChain":{"nullable":true,"type":"number"}},"required":["supplierId","officialName","noOfSupplyChain"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/facility-process-overview/":{"get":{"tags":["Supplier Statistics"],"description":"Get Facility Process Overview","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"facilityProcessId":{"nullable":true,"type":"string"},"facilityProcessName":{"nullable":true,"type":"string"},"countOfSuppliers":{"type":"number"}},"required":["facilityProcessId","facilityProcessName","countOfSuppliers"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/bulk-archive/":{"post":{"tags":["Company Chains"],"description":"Archive a set of company chains","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"collaborationIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["collaborationIds"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/bulk-unarchive/":{"post":{"tags":["Company Chains"],"description":"Unarchive a set of company chains","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"collaborationIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["collaborationIds"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/collaborations/{collaborationId}":{"get":{"tags":["Company Chains"],"description":"Get company chain","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"collaborationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"supplyChainId":{"type":"string"},"companyId":{"type":"string"},"supplyChainStatus":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"type":"string"},"invitedByCompanyId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdByUserId":{"type":"string"},"updatedByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"updatedByCompanyId":{"type":"string"},"collaboratingNodeId":{"type":"string"},"collaboratingSupplyChainName":{"type":"string"},"invitedByCompanyName":{"type":"string"},"message":{"type":"string"},"numberOfCollaborators":{"type":"number"},"numberOfMappedCompanies":{"type":"number"},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"nullable":true,"type":"string"},"supplyChainId":{"type":"string"},"depth":{"type":"number"},"numberOfDescendants":{"type":"number"},"nodeType":{"type":"string","enum":["root","leaf","intermediate","parent"]},"companyId":{"type":"string"},"companyName":{"type":"string"},"retracedRiskScore":{"type":"number"},"country":{"type":"string"},"countryName":{"type":"string"},"imageList":{"type":"array","items":{}},"officialName":{"type":"string"},"displayName":{"type":"string"},"supplyChainTier":{},"connectionType":{"type":"string"},"facilityProcesses":{"type":"array","items":{"type":"object","properties":{"facilityProcessId":{"type":"string"},"facilityProcessName":{"type":"string"}},"additionalProperties":false}},"canInvite":{"type":"boolean"},"isConnected":{"type":"boolean"},"reasonCode":{"type":"string"},"addedBy":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"lastNotifiedAt":{"type":"string"},"totalUsersCount":{"type":"number"},"activeUsersCount":{"type":"number"},"invitedUsersCount":{"type":"number"},"createdByCompanyId":{"type":"string"},"createdByCompanyName":{"type":"string"},"createdByUserId":{"type":"string"},"createdAt":{"type":"string"},"updatedByCompanyId":{"type":"string"},"updatedByCompanyName":{"type":"string"},"lastUpdated":{"type":"string"}},"required":["id","nodeType"],"additionalProperties":false}},"edges":{"type":"array","items":{"type":"object","properties":{"originNodeId":{"type":"string"},"destinationNodeId":{"type":"string"}},"additionalProperties":false}}},"required":["id","supplyChainId","companyId","supplyChainStatus","collaborationType","collaborationStatus","invitedByCompanyId","createdAt","updatedAt","createdByUserId","updatedByUserId","createdByCompanyId","updatedByCompanyId","collaboratingNodeId","collaboratingSupplyChainName","nodes","edges"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"patch":{"tags":["SupplyChain"],"description":"Map a company to a supply chain","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"originNodeId":{"type":"string","maxLength":128},"companies":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string","maxLength":128},"facilityProcesses":{"minItems":1,"type":"array","items":{"type":"object","properties":{"facilityProcessId":{"type":"string","minLength":1,"maxLength":60},"facilityProcessName":{"type":"string","minLength":1,"maxLength":128}}}}}}}},"required":["originNodeId","companies"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"collaborationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"supplyChainId":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"facilityProcesses":{},"numberOfDescendants":{"nullable":true,"type":"number"}},"required":["id","supplyChainId","companyId","facilityProcesses","numberOfDescendants"],"additionalProperties":false}}},"required":["nodes"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/collaborations/{collaborationId}/expand-all":{"get":{"tags":["Company Chains"],"description":"Get company chain","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"collaborationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"supplyChainId":{"type":"string"},"companyId":{"type":"string"},"supplyChainStatus":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"type":"string"},"invitedByCompanyId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdByUserId":{"type":"string"},"updatedByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"updatedByCompanyId":{"type":"string"},"collaboratingNodeId":{"type":"string"},"collaboratingSupplyChainName":{"type":"string"},"invitedByCompanyName":{"type":"string"},"message":{"type":"string"},"numberOfCollaborators":{"type":"number"},"numberOfMappedCompanies":{"type":"number"},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"nullable":true,"type":"string"},"supplyChainId":{"type":"string"},"depth":{"type":"number"},"numberOfDescendants":{"type":"number"},"nodeType":{"type":"string","enum":["root","leaf","intermediate","parent"]},"companyId":{"type":"string"},"companyName":{"type":"string"},"retracedRiskScore":{"type":"number"},"country":{"type":"string"},"countryName":{"type":"string"},"imageList":{"type":"array","items":{}},"officialName":{"type":"string"},"displayName":{"type":"string"},"supplyChainTier":{},"connectionType":{"type":"string"},"facilityProcesses":{"type":"array","items":{"type":"object","properties":{"facilityProcessId":{"type":"string"},"facilityProcessName":{"type":"string"}},"additionalProperties":false}},"canInvite":{"type":"boolean"},"isConnected":{"type":"boolean"},"reasonCode":{"type":"string"},"addedBy":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"lastNotifiedAt":{"type":"string"},"totalUsersCount":{"type":"number"},"activeUsersCount":{"type":"number"},"invitedUsersCount":{"type":"number"},"createdByCompanyId":{"type":"string"},"createdByCompanyName":{"type":"string"},"createdByUserId":{"type":"string"},"createdAt":{"type":"string"},"updatedByCompanyId":{"type":"string"},"updatedByCompanyName":{"type":"string"},"lastUpdated":{"type":"string"}},"required":["id","nodeType"],"additionalProperties":false}},"edges":{"type":"array","items":{"type":"object","properties":{"originNodeId":{"type":"string"},"destinationNodeId":{"type":"string"}},"additionalProperties":false}}},"required":["id","supplyChainId","companyId","supplyChainStatus","collaborationType","collaborationStatus","invitedByCompanyId","createdAt","updatedAt","createdByUserId","updatedByUserId","createdByCompanyId","updatedByCompanyId","collaboratingNodeId","collaboratingSupplyChainName","nodes","edges"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/collaborations/{collaborationId}/map":{"get":{"tags":["Company Chains"],"description":"Get company chain data for map","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"collaborationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"companies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"color":{"type":"string"},"level":{"type":"number"},"position":{"type":"array","items":{"type":"number"}},"connectedTo":{"type":"array","items":{"type":"string"}},"officialName":{"type":"string"},"displayName":{"type":"string"},"facilityProcesses":{"type":"array","items":{"type":"object","properties":{"facilityProcessId":{"type":"string"},"facilityProcessName":{"type":"string"}},"additionalProperties":false}},"country":{"type":"string"},"countryName":{"type":"string"},"connectionType":{"type":"string"},"collaborationStatus":{"type":"string"},"collaborationRight":{"type":"string"},"retracedRiskScore":{"type":"string"},"relationshipType":{"nullable":true,"type":"string"}},"required":["color","position","connectedTo"],"additionalProperties":false}}},"required":["companies"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/collaborations/{collaborationId}/accept":{"patch":{"tags":["companyChain collaborations"],"description":"Accept supply chain collaboration invitation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"collaborationName":{"type":"string","minLength":1,"maxLength":255}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"collaborationId","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/collaborations/{collaborationId}/invitation-reminders":{"patch":{"tags":["companyChains invitation reminder"],"description":"Remind about supply chain invitation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":36}}},"required":["companyIds"],"additionalProperties":{}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"collaborationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/collaborations/{collaborationId}/mapping-depth":{"patch":{"tags":["Collaboration mapping depth patch"],"description":"Update collaboration mapping depth","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mappingDepth":{"type":"string","minLength":1,"maxLength":255}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"collaborationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"supplyChainId":{"type":"string"},"companyId":{"type":"string"},"supplyChainStatus":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"type":"string"},"invitedByCompanyId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdByUserId":{"type":"string"},"updatedByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"updatedByCompanyId":{"type":"string"},"collaboratingNodeId":{"type":"string"},"collaboratingSupplyChainName":{"type":"string"},"mappingDepth":{"nullable":true,"type":"string"}},"required":["id","supplyChainId","companyId","supplyChainStatus","collaborationType","collaborationStatus","invitedByCompanyId","createdByUserId","updatedByUserId","createdByCompanyId","updatedByCompanyId","collaboratingNodeId","collaboratingSupplyChainName","mappingDepth"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/collaborations/{collaborationId}/metadata":{"patch":{"tags":["collaboration information patch"],"description":"Update collaboration related properties","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"collaboratingSupplyChainName":{"type":"string","minLength":1,"maxLength":255}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"collaborationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"supplyChainId":{"type":"string"},"companyId":{"type":"string"},"supplyChainStatus":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"type":"string"},"invitedByCompanyId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdByUserId":{"type":"string"},"updatedByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"updatedByCompanyId":{"type":"string"},"collaboratingNodeId":{"type":"string"},"collaboratingSupplyChainName":{"type":"string"},"mappingDepth":{"nullable":true,"type":"string"}},"required":["id","supplyChainId","companyId","supplyChainStatus","collaborationType","collaborationStatus","invitedByCompanyId","createdByUserId","updatedByUserId","createdByCompanyId","updatedByCompanyId","collaboratingNodeId","collaboratingSupplyChainName","mappingDepth"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/collaborations/{collaborationId}/status":{"patch":{"tags":["SupplyChain status patch"],"description":"Update supply chain status","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"supplyChainStatus":{"type":"string","enum":["IN_PROGRESS","IN_REVIEW","COMPLETED"]}},"required":["supplyChainStatus"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"collaborationId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"supplyChainId":{"type":"string"},"companyId":{"type":"string"},"supplyChainStatus":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"type":"string"},"invitedByCompanyId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdByUserId":{"type":"string"},"updatedByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"updatedByCompanyId":{"type":"string"},"collaboratingNodeId":{"type":"string"},"collaboratingSupplyChainName":{"type":"string"},"mappingDepth":{"nullable":true,"type":"string"}},"required":["id","supplyChainId","companyId","supplyChainStatus","collaborationType","collaborationStatus","invitedByCompanyId","createdByUserId","updatedByUserId","createdByCompanyId","updatedByCompanyId","collaboratingNodeId","collaboratingSupplyChainName","mappingDepth"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/collaborations/collaborating-nodes/{collaboratingNodeId}/invitation":{"get":{"tags":["Company Chains"],"description":"Get supply chain invitation","parameters":[{"schema":{"type":"string","enum":["INVITED","ACCEPTED"]},"in":"query","name":"collaborationStatus","required":false},{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"collaboratingNodeId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"supplyChainId":{"type":"string"},"companyId":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"type":"string"},"collaboratingNodeId":{"type":"string"},"collaboratingSupplyChainName":{"type":"string"},"invitedByCompanyId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdByUserId":{"type":"string"},"updatedByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"updatedByCompanyId":{"type":"string"}},"required":["id","supplyChainId","companyId","collaborationType","collaborationStatus","collaboratingNodeId","collaboratingSupplyChainName","invitedByCompanyId","createdAt","updatedAt","createdByUserId","updatedByUserId","createdByCompanyId","updatedByCompanyId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/collaborators/":{"get":{"tags":["Company Chains"],"description":"List All collaborators across all company chains","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":15,"type":"integer","minimum":0,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"sort","required":false},{"schema":{"type":"string"},"in":"query","name":"isArchived","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"supplyChainsCount":{"type":"number"},"companyId":{"type":"string"},"displayName":{"type":"string"},"officialName":{"type":"string"},"connectionType":{"type":"string"},"country":{"type":"string"},"countryName":{"type":"string"},"contributionValue":{"type":"number"}},"required":["supplyChainsCount","companyId","displayName","officialName","connectionType","country","countryName","contributionValue"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"number"},"pageSize":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"post":{"tags":["Supply Chain Collaborator"],"description":"Create supply chain collaborator","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceCollaborationId":{"type":"string","minLength":1,"maxLength":36},"collaboratingNodeIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":36}},"message":{"type":"string","minLength":1}},"required":["collaboratingNodeIds","message"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"supplyChainId":{"type":"string"},"companyId":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"type":"string"},"invitedByCompanyId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdByUserId":{"type":"string"},"updatedByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"updatedByCompanyId":{"type":"string"},"collaboratingNodeId":{"type":"string"},"collaboratingSupplyChainName":{"type":"string"}},"required":["id","supplyChainId","companyId","collaborationType","collaborationStatus","invitedByCompanyId","createdAt","updatedAt","createdByUserId","updatedByUserId","createdByCompanyId","updatedByCompanyId","collaboratingNodeId","collaboratingSupplyChainName"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/insights/global-diagram/":{"get":{"tags":["Company Chains"],"description":"Get Global Diagram","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"companies":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"companyName":{"type":"string"},"countryName":{"type":"string"},"country":{"type":"string"},"facilityProcesses":{"type":"array","items":{"type":"object","properties":{"facilityProcessId":{"type":"string"},"facilityProcessName":{"type":"string"}},"additionalProperties":false}}},"required":["companyId","companyName","countryName","country","facilityProcesses"],"additionalProperties":false}},"edges":{"type":"array","items":{"type":"object","properties":{"originCompanyId":{"type":"string"},"destinationCompanyId":{"type":"string"}},"additionalProperties":false}}},"required":["companies","edges"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/insights/suppliers/{companyId}":{"get":{"tags":["Company Chains"],"description":"Get single Supplier Details","parameters":[{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"type":"string"},"in":"path","name":"companyId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"officialName":{"type":"string"},"companyName":{"type":"string"},"country":{"type":"string"},"countryName":{"type":"string"},"connectionType":{"type":"string"},"retracedRiskScore":{"type":"number"},"supplyChainTier":{"type":"string"},"facilityProcesses":{"type":"array","items":{"type":"object","properties":{"facilityProcessId":{"type":"string"},"facilityProcessName":{"type":"string"}},"additionalProperties":false}},"supplyChains":{"type":"array","items":{"type":"object","properties":{"collaborationId":{"type":"string"},"supplyChainName":{"type":"string"}},"required":["collaborationId","supplyChainName"],"additionalProperties":false}},"mappedBySuppliers":{"type":"array","items":{"type":"object","properties":{"mappedByCompanyId":{"type":"string"},"mappedByCompanyName":{"type":"string"}},"required":["mappedByCompanyId","mappedByCompanyName"],"additionalProperties":false}},"mappedSuppliers":{"type":"array","items":{"type":"object","properties":{"mappedCompanyId":{"type":"string"},"mappedCompanyName":{"type":"string"}},"required":["mappedCompanyId","mappedCompanyName"],"additionalProperties":false}},"collaboratedSupplyChains":{"type":"array","items":{"type":"object","properties":{"collaborationId":{"type":"string"},"supplyChainName":{"type":"string"},"supplyChainId":{"type":"string"}},"required":["collaborationId","supplyChainName","supplyChainId"],"additionalProperties":false}}},"required":["officialName","companyName","country","countryName","connectionType","retracedRiskScore","supplyChainTier","facilityProcesses","supplyChains","mappedBySuppliers","mappedSuppliers","collaboratedSupplyChains"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/nodes/{nodeId}":{"get":{"tags":["Company Chains"],"description":"Get company chain","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"nodeId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"node":{"type":"object","properties":{"id":{"type":"string"},"supplyChainId":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"facilityProcesses":{},"createdAt":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"numberOfDescendants":{"nullable":true,"type":"number"},"parentId":{"nullable":true,"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"lastNotifiedAt":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"displayName":{"nullable":true,"type":"string"},"imageList":{},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"connectionType":{"nullable":true,"type":"string"},"collaborationRight":{"type":"string"},"retracedRiskScore":{"nullable":true,"type":"string"},"productTypes":{},"relationshipType":{},"supplyChainTier":{"nullable":true,"type":"string"},"addedAt":{"nullable":true,"type":"string"},"addedBy":{"nullable":true,"type":"string"},"totalUsersCount":{"type":"number"},"activeUsersCount":{"type":"number"},"invitedUsersCount":{"type":"number"}},"required":["id","supplyChainId","companyId","facilityProcesses","createdByCompanyId","updatedByCompanyId","numberOfDescendants","parentId","collaborationStatus","officialName","displayName","imageList","country","countryName","connectionType","collaborationRight","retracedRiskScore","productTypes","relationshipType","supplyChainTier","addedBy","totalUsersCount","activeUsersCount","invitedUsersCount"],"additionalProperties":{}}},"required":["node"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"patch":{"tags":["SupplyChain Nodes"],"description":"Update node facility processes","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"facilityProcesses":{"minItems":1,"type":"array","items":{"type":"object","properties":{"facilityProcessId":{"type":"string","minLength":1,"maxLength":60},"facilityProcessName":{"type":"string","minLength":1,"maxLength":128}}}}},"required":["facilityProcesses"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"nodeId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"nullable":true,"type":"string"},"supplyChainId":{"type":"string"},"companyId":{"type":"string"},"nodeFacilityProcesses":{},"facilityProcesses":{"type":"array","items":{"type":"object","properties":{"facilityProcessId":{"type":"string"},"facilityProcessName":{"type":"string"}},"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdByCompanyId":{"type":"string"},"updatedByCompanyId":{"type":"string"},"numberOfDescendants":{"type":"number"},"displayName":{"type":"string"}},"required":["id","parentId","supplyChainId","companyId","nodeFacilityProcesses","createdByCompanyId","updatedByCompanyId","numberOfDescendants","displayName"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"delete":{"tags":["Company Chains"],"description":"Remove a node and its descendants from a company chain","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"nodeId","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/nodes/{nodeId}/descedants":{"get":{"tags":["Company Chains"],"description":"Get company chain nodes","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"nodeId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"nodeId":{"type":"string"},"companyId":{"type":"string"},"officialName":{"type":"string"},"displayName":{"type":"string"},"country":{"type":"string"},"countryName":{"type":"string"},"facilityProcesses":{"type":"array","items":{"type":"object","properties":{"facilityProcessId":{"type":"string"},"facilityProcessName":{"type":"string"}},"additionalProperties":false}},"collaborationType":{"type":"string"},"collaborationStatus":{"type":"string"}},"required":["nodeId"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/nodes/{nodeId}/expand":{"get":{"tags":["Company Chains"],"description":"Get company chain","parameters":[{"schema":{"type":"number"},"in":"query","name":"levels","required":false},{"schema":{"type":"number"},"in":"query","name":"currentDepth","required":false},{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"nodeId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"nullable":true,"type":"string"},"supplyChainId":{"type":"string"},"depth":{"type":"number"},"numberOfDescendants":{"type":"number"},"nodeType":{"type":"string","enum":["root","leaf","intermediate","parent"]},"companyId":{"type":"string"},"companyName":{"type":"string"},"retracedRiskScore":{"type":"number"},"country":{"type":"string"},"countryName":{"type":"string"},"imageList":{"type":"array","items":{}},"officialName":{"type":"string"},"displayName":{"type":"string"},"supplyChainTier":{},"connectionType":{"type":"string"},"facilityProcesses":{"type":"array","items":{"type":"object","properties":{"facilityProcessId":{"type":"string"},"facilityProcessName":{"type":"string"}},"additionalProperties":false}},"canInvite":{"type":"boolean"},"isConnected":{"type":"boolean"},"reasonCode":{"type":"string"},"addedBy":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"lastNotifiedAt":{"type":"string"},"totalUsersCount":{"type":"number"},"activeUsersCount":{"type":"number"},"invitedUsersCount":{"type":"number"},"createdByCompanyId":{"type":"string"},"createdByCompanyName":{"type":"string"},"createdByUserId":{"type":"string"},"createdAt":{"type":"string"},"updatedByCompanyId":{"type":"string"},"updatedByCompanyName":{"type":"string"},"lastUpdated":{"type":"string"}},"required":["id","nodeType"],"additionalProperties":false}},"edges":{"type":"array","items":{"type":"object","properties":{"originNodeId":{"type":"string"},"destinationNodeId":{"type":"string"}},"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/supplychain-mappings/nodes/{nodeId}/replace":{"patch":{"tags":["Company Chains"],"description":"Replace the company mapped onto a node","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","maxLength":128},"facilityProcesses":{"minItems":1,"type":"array","items":{"type":"object","properties":{"facilityProcessId":{"type":"string"},"facilityProcessName":{"type":"string"}},"additionalProperties":{}}}},"required":["companyId","facilityProcesses"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"nodeId","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/product-mapping/list":{"post":{"tags":["Product Mapping"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"name","type":"string","enum":["name","collaborationType","collaborationStatus","updatedAt","status","createdAt","lastProductionProcessId"]},"name":{"type":"string","minLength":1},"status":{"type":"string"},"collaborationType":{"type":"string","minLength":1},"collaborationStatus":{"type":"string","minLength":1},"supplyChainId":{"type":"string"},"lastProductionProcessId":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}]},"isArchived":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/product-mapping/":{"post":{"tags":["Product Mapping"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"featuredFacilityProcessId":{"type":"string","minLength":1}},"required":["name","featuredFacilityProcessId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["IN_PROGRESS","SUBMITTED","APPROVED","CHANGES_REQUESTED","IN_REVIEW","COMPLETED"]},"companyId":{"nullable":true,"type":"string"},"startingTracingNodeId":{"nullable":true,"type":"string"},"isArchived":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"tracingType":{"nullable":true,"type":"string"},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"isOriginCountry":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isInternal":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isReceiving":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isConnected":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"level":{"nullable":true,"type":"number"},"originTracingNode":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false},"destinationTracingNode":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tracingLinkId":{"type":"string"},"styleId":{"type":"string"},"quantity":{"nullable":true,"type":"number"},"unit":{"nullable":true,"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"style":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["id","codes"],"additionalProperties":false}},"required":["id","tracingLinkId","styleId"],"additionalProperties":false}},"createdAt":{"nullable":true,"anyOf":[{"type":"string"}]},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"}]},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false}},"layers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"position":{"nullable":true,"type":"number"},"productionProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"number"},"color":{"nullable":true,"type":"string"},"iconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"name":{"nullable":true,"type":"string"},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false}}},"required":["id"],"additionalProperties":false}},"collaboratorId":{"nullable":true,"type":"string"},"supplyChainOwnerCompanyId":{"nullable":true,"type":"string"},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"invitedByCompanyId":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"company":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]}},"required":["id","officialName"],"additionalProperties":false},"facilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"invitedByCompany":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]}},"required":["id","officialName"],"additionalProperties":false},"invitedByUser":{"nullable":true,"type":"object","properties":{"id":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"}},"additionalProperties":false}},"required":["id","companyId","collaborationType","collaborationStatus","createdByCompanyId","createdByUserId","createdAt","company","invitedByCompany"],"additionalProperties":false},"stats":{"type":"object","properties":{"reviewCount":{"type":"number"},"requestChangesCount":{"type":"number"},"acceptedCount":{"type":"number"},"invitedCount":{"type":"number"},"approvedCount":{"type":"number"}},"required":["reviewCount","requestChangesCount","acceptedCount","invitedCount","approvedCount"],"additionalProperties":false},"createdAt":{"nullable":true,"anyOf":[{"type":"string"}]},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"}]},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/product-mapping/{id}":{"get":{"tags":["Product Mapping"],"parameters":[{"schema":{"type":"boolean"},"in":"query","name":"isRemovedStatusCheck","required":false},{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["IN_PROGRESS","SUBMITTED","APPROVED","CHANGES_REQUESTED","IN_REVIEW","COMPLETED"]},"companyId":{"nullable":true,"type":"string"},"startingTracingNodeId":{"nullable":true,"type":"string"},"isArchived":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"tracingType":{"nullable":true,"type":"string"},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"isOriginCountry":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isInternal":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isReceiving":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isConnected":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"level":{"nullable":true,"type":"number"},"originTracingNode":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false},"destinationTracingNode":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tracingLinkId":{"type":"string"},"styleId":{"type":"string"},"quantity":{"nullable":true,"type":"number"},"unit":{"nullable":true,"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"style":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["id","codes"],"additionalProperties":false}},"required":["id","tracingLinkId","styleId"],"additionalProperties":false}},"createdAt":{"nullable":true,"anyOf":[{"type":"string"}]},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"}]},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false}},"layers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"position":{"nullable":true,"type":"number"},"productionProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"number"},"color":{"nullable":true,"type":"string"},"iconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"name":{"nullable":true,"type":"string"},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false}}},"required":["id"],"additionalProperties":false}},"collaboratorId":{"nullable":true,"type":"string"},"supplyChainOwnerCompanyId":{"nullable":true,"type":"string"},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"invitedByCompanyId":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"company":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]}},"required":["id","officialName"],"additionalProperties":false},"facilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"invitedByCompany":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]}},"required":["id","officialName"],"additionalProperties":false},"invitedByUser":{"nullable":true,"type":"object","properties":{"id":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"}},"additionalProperties":false}},"required":["id","companyId","collaborationType","collaborationStatus","createdByCompanyId","createdByUserId","createdAt","company","invitedByCompany"],"additionalProperties":false},"stats":{"type":"object","properties":{"reviewCount":{"type":"number"},"requestChangesCount":{"type":"number"},"acceptedCount":{"type":"number"},"invitedCount":{"type":"number"},"approvedCount":{"type":"number"}},"required":["reviewCount","requestChangesCount","acceptedCount","invitedCount","approvedCount"],"additionalProperties":false},"createdAt":{"nullable":true,"anyOf":[{"type":"string"}]},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"}]},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/product-mapping/{id}/extend":{"post":{"tags":["Product Mapping"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1},"featuredFacilityProcessId":{"type":"string","minLength":1},"nodeId":{"type":"string","minLength":1},"lines":{"type":"array","items":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"quantity":{"nullable":true,"type":"number","minimum":0,"exclusiveMinimum":true},"unit":{"type":"string","enum":["LITRE","MILLILITRE","CENTILITRE","CUBIC_DECIMETRE","CUBIC_METRE","GALLON","QUART","PINT","GILL","FLUID_OUNCE","FLUID_DRAM","MINIM","BUSHEL","ACRE_FOOT","CORD","CUBIC_YARD","CUBIC_FOOT","CUBIC_INCH","PECK","METRE","MILLIMETRE","DECIMETRE","CENTIMETRE","INCH","NAUTICAL_MILE","MILE","FURLONG","ROD","FATHOM","YARD","FOOT","GRAM","GRAM_PER_SQUARE_METER","GRAM_PER_SQUARE_FOOT","GRAM_PER_SQUARE_YARD","OUNCE_PER_SQUARE_YARD","MILLIGRAM","KILOGRAM","METRIC_TON","POUNDS","SHORT_TON","LONG_TON","HUNDREDWEIGHT","SHORT_HUNDREDWEIGHT","LONG_HUNDREDWEIGHT","OUNCE","DRAM","GRAIN","PENNYWEIGHT","SCRUPLE","STONE","SQUARE_METRE","SQUARE_DECIMETRE","SQUARE_CENTIMETRE","SQUARE_INCH","SQUARE_MILE","SQUARE_FEET","SQUARE_ROD","SQUARE_YARD","PIECES","PAIR","PERCENTAGE","DENIER","JUTE","ENGLISH_COUNT","METRIC_COUNT","WORSTED_COUNT","TEX","ACRE","KILOWATT_HOUR","MOUND"]},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"type":"string","enum":["LITRE","MILLILITRE","CENTILITRE","CUBIC_DECIMETRE","CUBIC_METRE","GALLON","QUART","PINT","GILL","FLUID_OUNCE","FLUID_DRAM","MINIM","BUSHEL","ACRE_FOOT","CORD","CUBIC_YARD","CUBIC_FOOT","CUBIC_INCH","PECK","METRE","MILLIMETRE","DECIMETRE","CENTIMETRE","INCH","NAUTICAL_MILE","MILE","FURLONG","ROD","FATHOM","YARD","FOOT","GRAM","GRAM_PER_SQUARE_METER","GRAM_PER_SQUARE_FOOT","GRAM_PER_SQUARE_YARD","OUNCE_PER_SQUARE_YARD","MILLIGRAM","KILOGRAM","METRIC_TON","POUNDS","SHORT_TON","LONG_TON","HUNDREDWEIGHT","SHORT_HUNDREDWEIGHT","LONG_HUNDREDWEIGHT","OUNCE","DRAM","GRAIN","PENNYWEIGHT","SCRUPLE","STONE","SQUARE_METRE","SQUARE_DECIMETRE","SQUARE_CENTIMETRE","SQUARE_INCH","SQUARE_MILE","SQUARE_FEET","SQUARE_ROD","SQUARE_YARD","PIECES","PAIR","PERCENTAGE","DENIER","JUTE","ENGLISH_COUNT","METRIC_COUNT","WORSTED_COUNT","TEX","ACRE","KILOWATT_HOUR","MOUND"]}},"required":["styleId","quantity","unit"]}}},"required":["companyId","featuredFacilityProcessId","nodeId"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["IN_PROGRESS","SUBMITTED","APPROVED","CHANGES_REQUESTED","IN_REVIEW","COMPLETED"]},"companyId":{"nullable":true,"type":"string"},"startingTracingNodeId":{"nullable":true,"type":"string"},"isArchived":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"tracingType":{"nullable":true,"type":"string"},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"isOriginCountry":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isInternal":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isReceiving":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isConnected":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"level":{"nullable":true,"type":"number"},"originTracingNode":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false},"destinationTracingNode":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tracingLinkId":{"type":"string"},"styleId":{"type":"string"},"quantity":{"nullable":true,"type":"number"},"unit":{"nullable":true,"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"style":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["id","codes"],"additionalProperties":false}},"required":["id","tracingLinkId","styleId"],"additionalProperties":false}},"createdAt":{"nullable":true,"anyOf":[{"type":"string"}]},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"}]},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false}},"layers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"position":{"nullable":true,"type":"number"},"productionProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"number"},"color":{"nullable":true,"type":"string"},"iconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"name":{"nullable":true,"type":"string"},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false}}},"required":["id"],"additionalProperties":false}},"collaboratorId":{"nullable":true,"type":"string"},"supplyChainOwnerCompanyId":{"nullable":true,"type":"string"},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"invitedByCompanyId":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"company":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]}},"required":["id","officialName"],"additionalProperties":false},"facilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"invitedByCompany":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]}},"required":["id","officialName"],"additionalProperties":false},"invitedByUser":{"nullable":true,"type":"object","properties":{"id":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"}},"additionalProperties":false}},"required":["id","companyId","collaborationType","collaborationStatus","createdByCompanyId","createdByUserId","createdAt","company","invitedByCompany"],"additionalProperties":false},"stats":{"type":"object","properties":{"reviewCount":{"type":"number"},"requestChangesCount":{"type":"number"},"acceptedCount":{"type":"number"},"invitedCount":{"type":"number"},"approvedCount":{"type":"number"}},"required":["reviewCount","requestChangesCount","acceptedCount","invitedCount","approvedCount"],"additionalProperties":false},"createdAt":{"nullable":true,"anyOf":[{"type":"string"}]},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"}]},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/product-mapping/link/{linkId}":{"get":{"tags":["Product Mapping"],"description":"Get supply chain link by id","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"supplyChainId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"linkId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"isOriginCountry":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isInternal":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isReceiving":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isConnected":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"level":{"nullable":true,"type":"number"},"originTracingNode":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false},"destinationTracingNode":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tracingLinkId":{"type":"string"},"styleId":{"type":"string"},"quantity":{"nullable":true,"type":"number"},"unit":{"nullable":true,"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"style":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["id","codes"],"additionalProperties":false}},"required":["id","tracingLinkId","styleId"],"additionalProperties":false}},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/product-mapping/nodes/{nodeId}":{"delete":{"tags":["Product Mapping"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"supplyChainId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"nodeId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["IN_PROGRESS","SUBMITTED","APPROVED","CHANGES_REQUESTED","IN_REVIEW","COMPLETED"]},"companyId":{"nullable":true,"type":"string"},"startingTracingNodeId":{"nullable":true,"type":"string"},"isArchived":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"tracingType":{"nullable":true,"type":"string"},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"isOriginCountry":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isInternal":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isReceiving":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isConnected":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"level":{"nullable":true,"type":"number"},"originTracingNode":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false},"destinationTracingNode":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tracingLinkId":{"type":"string"},"styleId":{"type":"string"},"quantity":{"nullable":true,"type":"number"},"unit":{"nullable":true,"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"style":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["id","codes"],"additionalProperties":false}},"required":["id","tracingLinkId","styleId"],"additionalProperties":false}},"createdAt":{"nullable":true,"anyOf":[{"type":"string"}]},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"}]},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false}},"layers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"position":{"nullable":true,"type":"number"},"productionProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"number"},"color":{"nullable":true,"type":"string"},"iconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"name":{"nullable":true,"type":"string"},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false}}},"required":["id"],"additionalProperties":false}},"collaboratorId":{"nullable":true,"type":"string"},"supplyChainOwnerCompanyId":{"nullable":true,"type":"string"},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"invitedByCompanyId":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"company":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]}},"required":["id","officialName"],"additionalProperties":false},"facilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"invitedByCompany":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]}},"required":["id","officialName"],"additionalProperties":false},"invitedByUser":{"nullable":true,"type":"object","properties":{"id":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"}},"additionalProperties":false}},"required":["id","companyId","collaborationType","collaborationStatus","createdByCompanyId","createdByUserId","createdAt","company","invitedByCompany"],"additionalProperties":false},"stats":{"type":"object","properties":{"reviewCount":{"type":"number"},"requestChangesCount":{"type":"number"},"acceptedCount":{"type":"number"},"invitedCount":{"type":"number"},"approvedCount":{"type":"number"}},"required":["reviewCount","requestChangesCount","acceptedCount","invitedCount","approvedCount"],"additionalProperties":false},"createdAt":{"nullable":true,"anyOf":[{"type":"string"}]},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"}]},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"204":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/product-mapping/links/{linkId}":{"patch":{"tags":["Product Mapping"],"description":"Allows update of supply chain link data.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"supplyChainId":{"type":"string","minLength":1},"lines":{"type":"array","items":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"quantity":{"nullable":true,"type":"number","minimum":0,"exclusiveMinimum":true},"unit":{"type":"string","enum":["LITRE","MILLILITRE","CENTILITRE","CUBIC_DECIMETRE","CUBIC_METRE","GALLON","QUART","PINT","GILL","FLUID_OUNCE","FLUID_DRAM","MINIM","BUSHEL","ACRE_FOOT","CORD","CUBIC_YARD","CUBIC_FOOT","CUBIC_INCH","PECK","METRE","MILLIMETRE","DECIMETRE","CENTIMETRE","INCH","NAUTICAL_MILE","MILE","FURLONG","ROD","FATHOM","YARD","FOOT","GRAM","GRAM_PER_SQUARE_METER","GRAM_PER_SQUARE_FOOT","GRAM_PER_SQUARE_YARD","OUNCE_PER_SQUARE_YARD","MILLIGRAM","KILOGRAM","METRIC_TON","POUNDS","SHORT_TON","LONG_TON","HUNDREDWEIGHT","SHORT_HUNDREDWEIGHT","LONG_HUNDREDWEIGHT","OUNCE","DRAM","GRAIN","PENNYWEIGHT","SCRUPLE","STONE","SQUARE_METRE","SQUARE_DECIMETRE","SQUARE_CENTIMETRE","SQUARE_INCH","SQUARE_MILE","SQUARE_FEET","SQUARE_ROD","SQUARE_YARD","PIECES","PAIR","PERCENTAGE","DENIER","JUTE","ENGLISH_COUNT","METRIC_COUNT","WORSTED_COUNT","TEX","ACRE","KILOWATT_HOUR","MOUND"]},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"type":"string","enum":["LITRE","MILLILITRE","CENTILITRE","CUBIC_DECIMETRE","CUBIC_METRE","GALLON","QUART","PINT","GILL","FLUID_OUNCE","FLUID_DRAM","MINIM","BUSHEL","ACRE_FOOT","CORD","CUBIC_YARD","CUBIC_FOOT","CUBIC_INCH","PECK","METRE","MILLIMETRE","DECIMETRE","CENTIMETRE","INCH","NAUTICAL_MILE","MILE","FURLONG","ROD","FATHOM","YARD","FOOT","GRAM","GRAM_PER_SQUARE_METER","GRAM_PER_SQUARE_FOOT","GRAM_PER_SQUARE_YARD","OUNCE_PER_SQUARE_YARD","MILLIGRAM","KILOGRAM","METRIC_TON","POUNDS","SHORT_TON","LONG_TON","HUNDREDWEIGHT","SHORT_HUNDREDWEIGHT","LONG_HUNDREDWEIGHT","OUNCE","DRAM","GRAIN","PENNYWEIGHT","SCRUPLE","STONE","SQUARE_METRE","SQUARE_DECIMETRE","SQUARE_CENTIMETRE","SQUARE_INCH","SQUARE_MILE","SQUARE_FEET","SQUARE_ROD","SQUARE_YARD","PIECES","PAIR","PERCENTAGE","DENIER","JUTE","ENGLISH_COUNT","METRIC_COUNT","WORSTED_COUNT","TEX","ACRE","KILOWATT_HOUR","MOUND"]}},"required":["styleId","quantity","unit"]}}},"required":["supplyChainId","lines"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"linkId","required":true}],"responses":{"204":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/product-mapping/{id}/status":{"patch":{"tags":["Product Mapping"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["IN_PROGRESS","IN_REVIEW","COMPLETED"]}},"required":["status"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/product-mapping/bulk-import":{"post":{"tags":["Supply Chains"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileId":{"type":"string","minLength":1}},"required":["fileId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"bulkImportId":{"type":"string"},"message":{"type":"string"}},"required":["bulkImportId","message"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"413":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/product-mapping/bulk-create":{"post":{"tags":["Product Mapping"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"styleIds":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string"}},"supplier":{"type":"object","properties":{"companyId":{"type":"string"},"facilityProcessId":{"type":"string"}},"required":["companyId","facilityProcessId"]},"invitationMessage":{"type":"string"},"duplicateStrategy":{"type":"string","enum":["skip","duplicate"]}},"required":["styleIds","supplier"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"created":{"type":"number"},"supplyChainIds":{"type":"array","items":{"type":"string"}},"skippedStyleIds":{"type":"array","items":{"type":"string"}},"duplicatedStyleIds":{"type":"array","items":{"type":"string"}}},"required":["created","supplyChainIds"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/product-mapping/bulk-export":{"post":{"tags":["Product Mapping"],"description":"Queue an async bulk export of product maps","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"collaboratorIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"exportId":{"type":"string"},"message":{"type":"string"}},"required":["exportId","message"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/product-mapping/unarchive":{"post":{"tags":["Product Mapping"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["ids"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"successIds":{"type":"array","items":{"type":"string"}},"notFoundIds":{"type":"array","items":{"type":"string"}}},"required":["successIds","notFoundIds"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/product-mapping/{id}/collaborators":{"post":{"tags":["Product Mapping"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fromCollaboratorId":{"type":"string","minLength":1},"companyId":{"type":"string","minLength":1},"tracingNodeId":{"type":"string","minLength":1},"message":{"type":"string"}},"required":["fromCollaboratorId","companyId","tracingNodeId"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"supplyChainId":{"type":"string"},"companyId":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"}},"required":["id","supplyChainId","companyId","collaborationType"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/product-mapping/collaborators/list":{"post":{"tags":["Product Mapping"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"collaboratorId":{"type":"string","minLength":1},"collaborationStatus":{"type":"string"},"collaborationType":{"type":"string"}},"required":["collaboratorId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"invitedByCompanyId":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"company":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]}},"required":["id","officialName"],"additionalProperties":false},"facilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"invitedByCompany":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]}},"required":["id","officialName"],"additionalProperties":false},"invitedByUser":{"nullable":true,"type":"object","properties":{"id":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"}},"additionalProperties":false}},"required":["id","companyId","collaborationType","collaborationStatus","createdByCompanyId","createdByUserId","createdAt","company","invitedByCompany"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/product-mapping/collaborators/{id}/status":{"patch":{"tags":["Product Mapping - Communications"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["IN_REVIEW","REQUEST_CHANGES","APPROVED","ACCEPTED"]},"message":{"type":"string"}},"required":["status"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/product-mapping/collaborators/{id}":{"get":{"tags":["Product Mapping - Communications"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"invitedByCompanyId":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"company":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]}},"required":["id","officialName"],"additionalProperties":false},"facilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"invitedByCompany":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]}},"required":["id","officialName"],"additionalProperties":false},"invitedByUser":{"nullable":true,"type":"object","properties":{"id":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"}},"additionalProperties":false},"supplyChain":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"status":{"type":"string"}},"required":["id","status"],"additionalProperties":false}},"required":["id","companyId","collaborationType","collaborationStatus","createdByCompanyId","createdByUserId","createdAt","company","invitedByCompany","supplyChain"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}},"delete":{"tags":["Product Mapping"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/product-mapping/collaborators/{id}/copy":{"post":{"tags":["Product Mapping"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"supplyChainId":{"type":"string"},"collaboratorId":{"type":"string"}},"required":["supplyChainId","collaboratorId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/product-mapping/collaborators/{id}/attach-existing":{"post":{"tags":["Product Mapping"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"productMapIdToAttach":{"type":"string","minLength":1},"tracingNodeIdToAttachFrom":{"type":"string","minLength":1}},"required":["productMapIdToAttach","tracingNodeIdToAttachFrom"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["IN_PROGRESS","SUBMITTED","APPROVED","CHANGES_REQUESTED","IN_REVIEW","COMPLETED"]},"companyId":{"nullable":true,"type":"string"},"startingTracingNodeId":{"nullable":true,"type":"string"},"isArchived":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"tracingType":{"nullable":true,"type":"string"},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"isOriginCountry":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isInternal":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isReceiving":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isConnected":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"level":{"nullable":true,"type":"number"},"originTracingNode":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false},"destinationTracingNode":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tracingLinkId":{"type":"string"},"styleId":{"type":"string"},"quantity":{"nullable":true,"type":"number"},"unit":{"nullable":true,"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"style":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["id","codes"],"additionalProperties":false}},"required":["id","tracingLinkId","styleId"],"additionalProperties":false}},"createdAt":{"nullable":true,"anyOf":[{"type":"string"}]},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"}]},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false}},"layers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"position":{"nullable":true,"type":"number"},"productionProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"number"},"color":{"nullable":true,"type":"string"},"iconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"name":{"nullable":true,"type":"string"},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false}}},"required":["id"],"additionalProperties":false}},"collaboratorId":{"nullable":true,"type":"string"},"supplyChainOwnerCompanyId":{"nullable":true,"type":"string"},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"invitedByCompanyId":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"company":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]}},"required":["id","officialName"],"additionalProperties":false},"facilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"invitedByCompany":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]}},"required":["id","officialName"],"additionalProperties":false},"invitedByUser":{"nullable":true,"type":"object","properties":{"id":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"}},"additionalProperties":false}},"required":["id","companyId","collaborationType","collaborationStatus","createdByCompanyId","createdByUserId","createdAt","company","invitedByCompany"],"additionalProperties":false},"stats":{"type":"object","properties":{"reviewCount":{"type":"number"},"requestChangesCount":{"type":"number"},"acceptedCount":{"type":"number"},"invitedCount":{"type":"number"},"approvedCount":{"type":"number"}},"required":["reviewCount","requestChangesCount","acceptedCount","invitedCount","approvedCount"],"additionalProperties":false},"createdAt":{"nullable":true,"anyOf":[{"type":"string"}]},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"}]},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/product-mapping/collaborators/attach-existing":{"post":{"tags":["Product Mapping"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceIds":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"pasteExistingId":{"type":"string","minLength":1}},"required":["sourceIds","pasteExistingId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"pasteExistingId":{"type":"string"},"successCount":{"type":"number"},"failureCount":{"type":"number"},"succeeded":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"nodeCount":{"type":"number"}},"required":["id","nodeCount"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}},"required":["id","code","message"],"additionalProperties":false}}},"required":["pasteExistingId","successCount","failureCount","succeeded","failed"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/product-mapping/collaborators/{id}/communication/list":{"post":{"tags":["Product Mapping - Communications"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"page":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"limit":{"default":3,"type":"integer","minimum":1,"maximum":9007199254740991},"createdForMe":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"collaboratorId":{"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"},"action":{"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"userName":{"nullable":true,"type":"string"},"companyName":{"nullable":true,"type":"string"}},"required":["id","collaboratorId","action"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/product-mapping/collaborators/{id}/graph":{"get":{"tags":["Product Mapping"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["IN_PROGRESS","SUBMITTED","APPROVED","CHANGES_REQUESTED","IN_REVIEW","COMPLETED"]},"companyId":{"nullable":true,"type":"string"},"startingTracingNodeId":{"nullable":true,"type":"string"},"isArchived":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"tracingType":{"nullable":true,"type":"string"},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"isOriginCountry":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isInternal":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isReceiving":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isConnected":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"level":{"nullable":true,"type":"number"},"originTracingNode":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false},"destinationTracingNode":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tracingLinkId":{"type":"string"},"styleId":{"type":"string"},"quantity":{"nullable":true,"type":"number"},"unit":{"nullable":true,"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"style":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["id","codes"],"additionalProperties":false}},"required":["id","tracingLinkId","styleId"],"additionalProperties":false}},"createdAt":{"nullable":true,"anyOf":[{"type":"string"}]},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"}]},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false}},"layers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"position":{"nullable":true,"type":"number"},"productionProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"number"},"color":{"nullable":true,"type":"string"},"iconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"name":{"nullable":true,"type":"string"},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false}}},"required":["id"],"additionalProperties":false}},"collaboratorId":{"nullable":true,"type":"string"},"supplyChainOwnerCompanyId":{"nullable":true,"type":"string"},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"invitedByCompanyId":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"company":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]}},"required":["id","officialName"],"additionalProperties":false},"facilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"invitedByCompany":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]}},"required":["id","officialName"],"additionalProperties":false},"invitedByUser":{"nullable":true,"type":"object","properties":{"id":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"}},"additionalProperties":false}},"required":["id","companyId","collaborationType","collaborationStatus","createdByCompanyId","createdByUserId","createdAt","company","invitedByCompany"],"additionalProperties":false},"stats":{"type":"object","properties":{"reviewCount":{"type":"number"},"requestChangesCount":{"type":"number"},"acceptedCount":{"type":"number"},"invitedCount":{"type":"number"},"approvedCount":{"type":"number"}},"required":["reviewCount","requestChangesCount","acceptedCount","invitedCount","approvedCount"],"additionalProperties":false},"createdAt":{"nullable":true,"anyOf":[{"type":"string"}]},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"}]},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/product-mapping/collaborators/{id}/remind":{"post":{"tags":["Product Mapping - Communications"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["INVITED","IN_REVIEW","REQUEST_CHANGES","APPROVED","ACCEPTED"]},"shouldSendEmail":{"default":true,"type":"boolean"},"shouldSendInApp":{"default":true,"type":"boolean"}},"required":["status"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/product-mapping/collaborators/{id}/node-extend":{"post":{"tags":["Product Mapping"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1},"featuredFacilityProcessId":{"type":"string","minLength":1},"nodeId":{"type":"string","minLength":1},"lines":{"type":"array","items":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"quantity":{"nullable":true,"type":"number","minimum":0,"exclusiveMinimum":true},"unit":{"type":"string","enum":["LITRE","MILLILITRE","CENTILITRE","CUBIC_DECIMETRE","CUBIC_METRE","GALLON","QUART","PINT","GILL","FLUID_OUNCE","FLUID_DRAM","MINIM","BUSHEL","ACRE_FOOT","CORD","CUBIC_YARD","CUBIC_FOOT","CUBIC_INCH","PECK","METRE","MILLIMETRE","DECIMETRE","CENTIMETRE","INCH","NAUTICAL_MILE","MILE","FURLONG","ROD","FATHOM","YARD","FOOT","GRAM","GRAM_PER_SQUARE_METER","GRAM_PER_SQUARE_FOOT","GRAM_PER_SQUARE_YARD","OUNCE_PER_SQUARE_YARD","MILLIGRAM","KILOGRAM","METRIC_TON","POUNDS","SHORT_TON","LONG_TON","HUNDREDWEIGHT","SHORT_HUNDREDWEIGHT","LONG_HUNDREDWEIGHT","OUNCE","DRAM","GRAIN","PENNYWEIGHT","SCRUPLE","STONE","SQUARE_METRE","SQUARE_DECIMETRE","SQUARE_CENTIMETRE","SQUARE_INCH","SQUARE_MILE","SQUARE_FEET","SQUARE_ROD","SQUARE_YARD","PIECES","PAIR","PERCENTAGE","DENIER","JUTE","ENGLISH_COUNT","METRIC_COUNT","WORSTED_COUNT","TEX","ACRE","KILOWATT_HOUR","MOUND"]},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"type":"string","enum":["LITRE","MILLILITRE","CENTILITRE","CUBIC_DECIMETRE","CUBIC_METRE","GALLON","QUART","PINT","GILL","FLUID_OUNCE","FLUID_DRAM","MINIM","BUSHEL","ACRE_FOOT","CORD","CUBIC_YARD","CUBIC_FOOT","CUBIC_INCH","PECK","METRE","MILLIMETRE","DECIMETRE","CENTIMETRE","INCH","NAUTICAL_MILE","MILE","FURLONG","ROD","FATHOM","YARD","FOOT","GRAM","GRAM_PER_SQUARE_METER","GRAM_PER_SQUARE_FOOT","GRAM_PER_SQUARE_YARD","OUNCE_PER_SQUARE_YARD","MILLIGRAM","KILOGRAM","METRIC_TON","POUNDS","SHORT_TON","LONG_TON","HUNDREDWEIGHT","SHORT_HUNDREDWEIGHT","LONG_HUNDREDWEIGHT","OUNCE","DRAM","GRAIN","PENNYWEIGHT","SCRUPLE","STONE","SQUARE_METRE","SQUARE_DECIMETRE","SQUARE_CENTIMETRE","SQUARE_INCH","SQUARE_MILE","SQUARE_FEET","SQUARE_ROD","SQUARE_YARD","PIECES","PAIR","PERCENTAGE","DENIER","JUTE","ENGLISH_COUNT","METRIC_COUNT","WORSTED_COUNT","TEX","ACRE","KILOWATT_HOUR","MOUND"]}},"required":["styleId","quantity","unit"]}}},"required":["companyId","featuredFacilityProcessId","nodeId"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["IN_PROGRESS","SUBMITTED","APPROVED","CHANGES_REQUESTED","IN_REVIEW","COMPLETED"]},"companyId":{"nullable":true,"type":"string"},"startingTracingNodeId":{"nullable":true,"type":"string"},"isArchived":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"tracingType":{"nullable":true,"type":"string"},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"isOriginCountry":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isInternal":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isReceiving":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isConnected":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"level":{"nullable":true,"type":"number"},"originTracingNode":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false},"destinationTracingNode":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tracingLinkId":{"type":"string"},"styleId":{"type":"string"},"quantity":{"nullable":true,"type":"number"},"unit":{"nullable":true,"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"style":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["id","codes"],"additionalProperties":false}},"required":["id","tracingLinkId","styleId"],"additionalProperties":false}},"createdAt":{"nullable":true,"anyOf":[{"type":"string"}]},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"}]},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false}},"layers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"position":{"nullable":true,"type":"number"},"productionProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"number"},"color":{"nullable":true,"type":"string"},"iconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"name":{"nullable":true,"type":"string"},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetCountryName":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"type":"string"}},"featuredFacilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"productionProcessId":{"nullable":true,"type":"string"},"productionProcessName":{"nullable":true,"type":"string"},"productionProcessDescription":{"nullable":true,"type":"string"},"productionProcessPosition":{"nullable":true,"type":"number"},"productionProcessIconBackgroundColor":{"nullable":true,"type":"string"},"productionProcessIconColor":{"nullable":true,"type":"string"},"productionProcessDepthLevel":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false},"featuredFacilityProcessName":{"nullable":true,"type":"string"},"productionProcess":{"nullable":true,"type":"string"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"gender":{"nullable":true,"type":"string"},"productCategoryId":{"nullable":true,"type":"string"},"isStoryActive":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isComponent":{"nullable":true,"type":"number"},"imagesFileIds":{"nullable":true,"type":"string"},"qrCodeId":{"nullable":true,"type":"string"},"qrCodeUrl":{"nullable":true,"type":"string"},"qrCodeContentType":{"nullable":true,"type":"string"},"materials":{"type":"array","items":{"type":"object","additionalProperties":{}}},"totalMaterialWeight":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string","minLength":1,"description":"Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID."},"codeValue":{"type":"string","minLength":1,"description":"The unique code value for this identifier, e.g. \"ERP-001234\"."}},"required":["codeId","codeValue"],"additionalProperties":false}},"productCategoryName":{"nullable":true,"type":"string"},"productCategoryQuantityUnits":{"type":"array","items":{"type":"string"}},"productCategoryWeightUnits":{"type":"array","items":{"type":"string"}},"productLevelName":{"nullable":true,"type":"string"},"productLevelQuantityUnits":{"type":"array","items":{"type":"string"}},"productLevelId":{"nullable":true,"type":"string"},"productLevelWeightUnits":{"type":"array","items":{"type":"string"}},"styleTypeName":{"nullable":true,"type":"string"},"styleLevelName":{"nullable":true,"type":"string"},"isWeightAvailable":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"categoryFieldValues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"styleCategoryFieldId":{"type":"string"},"fieldName":{"type":"string"},"fieldType":{"type":"string"},"fieldValue":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"value":{"nullable":true,"anyOf":[{"type":"string"},{"type":"number"}]},"unit":{"nullable":true,"type":"string"}},"additionalProperties":false}]},"standardFieldName":{"nullable":true,"type":"string"},"fieldOptions":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{}}]}},"required":["fieldName","fieldType"],"additionalProperties":false}},"productProperties":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"category":{"type":"string"},"forCompanyId":{"type":"string"}},"required":["id","value","category","forCompanyId"],"additionalProperties":false}}},"additionalProperties":false},"externalProductTypes":{"type":"array","items":{"type":"object","additionalProperties":{}}},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"lineId":{"nullable":true,"type":"string"},"productLevel":{"nullable":true,"type":"string"}},"required":["id","codes"],"additionalProperties":false}},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"workosOrganizationId":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","properties":{"url":{"nullable":true,"type":"string"},"originalUrl":{"nullable":true,"type":"string"}},"additionalProperties":false}},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"founders":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"number"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"isClientCompany":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"transliteratedOfficialName":{"nullable":true,"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"collaborationStartDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"connectionType":{"nullable":true,"type":"string"},"relationshipType":{"nullable":true},"collaborationStatus":{"nullable":true},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id"],"additionalProperties":false},"collaboratorStatus":{"nullable":true,"type":"string","enum":["OWNER","INVITED","ACCEPTED"]},"permissions":{"type":"array","items":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]}},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"invitedByCompanyId":{"nullable":true,"type":"string"},"tracingNodeId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false},"status":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"}},"required":["id","collaborationType","fromCollaboratorId"],"additionalProperties":false},"isParentNode":{"type":"boolean"},"isStartingNode":{"type":"boolean"}},"required":["id"],"additionalProperties":false}}},"required":["id"],"additionalProperties":false}},"collaboratorId":{"nullable":true,"type":"string"},"supplyChainOwnerCompanyId":{"nullable":true,"type":"string"},"collaborator":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"collaborationType":{"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"message":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"invitedByCompanyId":{"nullable":true,"type":"string"},"fromCollaboratorId":{"type":"string"},"company":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]}},"required":["id","officialName"],"additionalProperties":false},"facilityProcess":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"invitedByCompany":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"type":"string"},"isRemoved":{"nullable":true,"anyOf":[{"type":"number"},{"type":"boolean"}]}},"required":["id","officialName"],"additionalProperties":false},"invitedByUser":{"nullable":true,"type":"object","properties":{"id":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"}},"additionalProperties":false}},"required":["id","companyId","collaborationType","collaborationStatus","createdByCompanyId","createdByUserId","createdAt","company","invitedByCompany"],"additionalProperties":false},"stats":{"type":"object","properties":{"reviewCount":{"type":"number"},"requestChangesCount":{"type":"number"},"acceptedCount":{"type":"number"},"invitedCount":{"type":"number"},"approvedCount":{"type":"number"}},"required":["reviewCount","requestChangesCount","acceptedCount","invitedCount","approvedCount"],"additionalProperties":false},"createdAt":{"nullable":true,"anyOf":[{"type":"string"}]},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"}]},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/product-mapping/collaborators/{id}/node/{nodeId}":{"delete":{"tags":["Product Mapping"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"nodeId","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/product-mapping/{id}/overrides":{"post":{"tags":["Product Mapping"],"description":"Create a permission override for a collaborator node","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"collaborationId":{"type":"string","minLength":1},"tracingNodeId":{"type":"string","minLength":1},"action":{"type":"string","enum":["VIEW","EXTEND","UPDATE","REMOVE"]},"effect":{"type":"string","enum":["DENY"]}},"required":["collaborationId","tracingNodeId","action","effect"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"supplyChainId":{"type":"string"},"collaborationId":{"type":"string"},"tracingNodeId":{"type":"string"},"action":{"type":"string"},"effect":{"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","supplyChainId","collaborationId","tracingNodeId","action","effect"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/product-mapping/{id}/overrides/{overrideId}":{"delete":{"tags":["Product Mapping"],"description":"Delete a permission override","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"overrideId","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/product-mapping/{id}/overrides/list":{"post":{"tags":["Product Mapping"],"description":"List permission overrides for a supply chain","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"collaborationId":{"type":"string"},"tracingNodeId":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"supplyChainId":{"type":"string"},"collaborationId":{"type":"string"},"tracingNodeId":{"type":"string"},"action":{"type":"string"},"effect":{"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","supplyChainId","collaborationId","tracingNodeId","action","effect"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/tracing-ai/bulk-summary":{"post":{"tags":["Tracing AI"],"description":"Queue multiple orders for AI summarization processing in bulk","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}},"traceType":{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER"]},"summaryTypes":{"description":"Optional AI summary types to process. If not provided, all types will be processed.","minItems":1,"type":"array","items":{"type":"string","enum":["docType","docContent","scAnalysis"]}}},"required":["ids","traceType"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"processed":{"type":"number"},"queued":{"type":"number"},"skipped":{"type":"number"},"errors":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","error","skipped"]},"message":{"type":"string"}},"required":["id","status"],"additionalProperties":false}}},"required":["processed","queued","skipped","errors","items"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/tracing-ai/{id}/dataset":{"get":{"tags":["Tracing AI"],"description":"Generate and download a dataset CSV for AI summary analysis. Returns a signed URL valid for 1 hour.","parameters":[{"schema":{"type":"string","enum":["doc_type","doc_content","sc_analysis"]},"in":"query","name":"type","required":true,"description":"Dataset type to download"},{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"AI Summary ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"fileId":{"type":"string"},"fileName":{"type":"string"},"downloadUrl":{"type":"string"},"expiresIn":{"type":"number","description":"URL expiration time in seconds"}},"required":["fileId","fileName","downloadUrl","expiresIn"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/tracing-ai/summary/{id}":{"get":{"tags":["Tracing AI"],"description":"Get AI summary by ID","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"Tracing type order ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"tracingType":{"type":"string"},"tracingId":{"type":"string"},"companyId":{"type":"string"},"isStale":{"type":"boolean"},"rawData":{"nullable":true,"type":"object","properties":{"status":{"type":"string"},"result":{"nullable":true}},"additionalProperties":{}},"docType":{"nullable":true,"type":"object","properties":{"status":{"type":"string"},"result":{"nullable":true}},"additionalProperties":{}},"docContent":{"nullable":true,"type":"object","properties":{"status":{"type":"string"},"result":{"nullable":true}},"additionalProperties":{}},"scAnalysis":{"nullable":true,"type":"object","properties":{"status":{"type":"string"},"result":{"nullable":true}},"additionalProperties":{}},"docTypeDataset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"},"createdByUserId":{"type":"string"},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","url","name","createdAt","createdByUserId"],"additionalProperties":{}},"docContentDataset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"},"createdByUserId":{"type":"string"},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","url","name","createdAt","createdByUserId"],"additionalProperties":{}},"scAnalysisDataset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"},"createdByUserId":{"type":"string"},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","url","name","createdAt","createdByUserId"],"additionalProperties":{}},"docTypeDatasetFileId":{"nullable":true,"type":"string"},"docContentDatasetFileId":{"nullable":true,"type":"string"},"scAnalysisDatasetFileId":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByImpersonateName":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"}},"required":["id","tracingType","tracingId","companyId","isStale"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/tracing-ai/summary/cancel":{"post":{"tags":["Tracing AI"],"description":"Cancel a stuck tracing AI analysis. Allowed only after 1 hour of processing. Cancels all in-flight types, or only the requested ones.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tracingId":{"type":"string","description":"Tracing order ID"},"traceType":{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER"]},"summaryTypes":{"description":"Optional AI summary types to cancel. If not provided, all in-flight types are cancelled.","minItems":1,"type":"array","items":{"type":"string","enum":["docType","docContent","scAnalysis"]}}},"required":["tracingId","traceType"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["CANCELLED"]},"cancelledTypes":{"type":"array","items":{"type":"string","enum":["docType","docContent","scAnalysis"]}},"allTerminal":{"type":"boolean"}},"required":["id","status","cancelledTypes","allTerminal"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/tracing-ai/summary/{summaryId}/validate":{"post":{"tags":["Tracing AI"],"description":"Mark a result as validated in AI summary","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tracingType":{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER"]},"tracingId":{"type":"string","description":"Tracing order ID"},"summaryType":{"type":"string","enum":["docContent","docType","scAnalysis"],"description":"The summary type to validate"},"tracingDocumentId":{"description":"Tracing document ID to validate (required for docContent/docType)","type":"string"},"linkId":{"description":"Link ID (required for scAnalysis)","type":"string"}},"required":["tracingType","tracingId","summaryType"]}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"summaryId","required":true,"description":"AI Summary ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"tracingType":{"type":"string"},"tracingId":{"type":"string"},"companyId":{"type":"string"},"isStale":{"type":"boolean"},"rawData":{"nullable":true,"type":"object","properties":{"status":{"type":"string"},"result":{"nullable":true}},"additionalProperties":{}},"docType":{"nullable":true,"type":"object","properties":{"status":{"type":"string"},"result":{"nullable":true}},"additionalProperties":{}},"docContent":{"nullable":true,"type":"object","properties":{"status":{"type":"string"},"result":{"nullable":true}},"additionalProperties":{}},"scAnalysis":{"nullable":true,"type":"object","properties":{"status":{"type":"string"},"result":{"nullable":true}},"additionalProperties":{}},"docTypeDataset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"},"createdByUserId":{"type":"string"},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","url","name","createdAt","createdByUserId"],"additionalProperties":{}},"docContentDataset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"},"createdByUserId":{"type":"string"},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","url","name","createdAt","createdByUserId"],"additionalProperties":{}},"scAnalysisDataset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"},"createdByUserId":{"type":"string"},"previewUrl":{"nullable":true,"type":"string"}},"required":["id","url","name","createdAt","createdByUserId"],"additionalProperties":{}},"docTypeDatasetFileId":{"nullable":true,"type":"string"},"docContentDatasetFileId":{"nullable":true,"type":"string"},"scAnalysisDatasetFileId":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByImpersonateName":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"}},"required":["id","tracingType","tracingId","companyId","isStale"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/tracing-ai/summary/workflow-trace/total":{"get":{"tags":["Tracing AI"],"description":"Get AI credit totals for the company","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"balance":{"type":"number"},"reserved":{"type":"number"},"consumed":{"type":"number"}},"required":["balance","reserved","consumed"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/tracing-ai/admin/summary/clear":{"post":{"summary":"Clear AI analysis for a tracing order","tags":["Administration/Tracing AI"],"description":"Clears a specific AI summary analysis result for a given tracing order","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tracingId":{"type":"string","description":"Tracing order ID"},"tracingOrder":{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER"],"description":"Tracing order type"},"summaryType":{"type":"string","enum":["docType","docContent","scAnalysis"],"description":"Summary type to clear"}},"required":["tracingId","tracingOrder","summaryType"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/orders/purchases/list":{"post":{"tags":["Order Tracing - Purchase Orders"],"description":"List purchase orders","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"updatedAt","type":"string","enum":["updatedAt","createdAt","orderNumber","orderDate","agreedDeliveryDate","status","docCompletionPercentage","deliveryDate","scDocCompletionPercentage","lastProductionProcessId","tags","orderType","tracingAttachmentTemplateName"]},"filter":{"type":"string","maxLength":512},"isArchived":{"default":"false","anyOf":[{"type":"string"},{"type":"boolean"}]},"hasOrderNumber":{"default":"false","anyOf":[{"type":"string"},{"type":"boolean"}]},"orderNumber":{"type":"string","maxLength":512},"tracingSalesOrderNumber":{"type":"string","maxLength":512},"supplierCompanyId":{"type":"string"},"status":{"type":"string"},"lastProductionProcessId":{"type":"string"},"orderType":{"type":"string"},"receiverCompanyId":{"type":"string"},"tags":{"type":"string"},"productId":{"type":"string"}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tracingOrderId":{"type":"string"},"orderNumber":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"status":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"agreedDeliveryDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"isArchived":{"type":"boolean"},"tracingSalesOrderNumber":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByImpersonateName":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"deliveryDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"isInternal":{"type":"boolean"},"buyerCompanyId":{"type":"string"},"supplierCompanyId":{"type":"string"},"receiverCompanyId":{"type":"string"},"tracingAttachmentTemplateId":{"nullable":true,"type":"string"},"scDocCompletionPercentage":{"nullable":true,"type":"number"},"docCompletionPercentage":{"nullable":true,"type":"number"},"totalUploadedDocumentTypes":{"nullable":true,"type":"number"},"totalRequiredDocumentTypes":{"nullable":true,"type":"number"},"tracingOrderTags":{"nullable":true,"type":"string"},"lastProductionProcessId":{"nullable":true,"type":"string"},"tracingAttachmentTemplateName":{"nullable":true,"type":"string"},"orderType":{"nullable":true,"type":"string"},"lastProductionProcessName":{"nullable":true,"type":"string"},"color":{"nullable":true,"type":"string"},"depthLevel":{"nullable":true,"type":"number"},"aiSummary":{"nullable":true},"salesOrder":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"tracingOrderId":{"type":"string"},"orderNumber":{"nullable":true,"type":"string"},"orderType":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"status":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"agreedDeliveryDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"tracingPurchaseOrderNumber":{"nullable":true,"type":"string"},"buyerCompanyId":{"type":"string"},"supplierCompanyId":{"type":"string"},"receiverCompanyId":{"nullable":true,"type":"string"},"isInternal":{"anyOf":[{"type":"number"},{"type":"boolean"}]},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"receiverTracingNodeId":{"nullable":true,"type":"string"}},"required":["id","tracingOrderId","orderNumber","orderType","companyId","status","orderDate","agreedDeliveryDate","tracingPurchaseOrderNumber","buyerCompanyId","supplierCompanyId","receiverCompanyId","isInternal","originTracingNodeId","destinationTracingNodeId","receiverTracingNodeId"],"additionalProperties":{}},"linkedSalesOrders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tracingPurchaseOrderId":{"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"receiverTracingNodeId":{"nullable":true,"type":"string"},"orderNumber":{"nullable":true,"type":"string"},"isInternal":{"anyOf":[{"type":"number"},{"type":"boolean"}]},"buyerCompanyId":{"type":"string"},"supplierCompanyId":{"type":"string"},"receiverCompanyId":{"nullable":true,"type":"string"}},"required":["id","tracingPurchaseOrderId","originTracingNodeId","destinationTracingNodeId","receiverTracingNodeId","orderNumber","isInternal","buyerCompanyId","supplierCompanyId","receiverCompanyId"],"additionalProperties":{}}},"buyerCompany":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id","officialName","name","country","featuredImageFileId"],"additionalProperties":{}},"supplierCompany":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id","officialName","name","country","featuredImageFileId"],"additionalProperties":{}},"receiverCompany":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id","officialName","name","country","featuredImageFileId"],"additionalProperties":{}},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tracingPurchaseOrderId":{"type":"string"},"styleId":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"unit":{"nullable":true,"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"tracingSalesOrderLineId":{"nullable":true,"type":"string"},"tracingSalesOrderLineStyleId":{"nullable":true,"type":"string"},"deprecatedProductId":{"nullable":true,"type":"string"},"isProductLinked":{"type":"boolean"},"product":{"nullable":true}},"required":["id","tracingPurchaseOrderId","styleId","quantity","unit","secondaryQuantity","secondaryUnit","tracingSalesOrderLineId","tracingSalesOrderLineStyleId","deprecatedProductId","isProductLinked","product"],"additionalProperties":{}}}},"required":["id","tracingOrderId","orderNumber","companyId","status","orderDate","agreedDeliveryDate","isArchived","tracingSalesOrderNumber","createdAt","createdByUserId","createdByUserName","createdByCompanyId","createdByCompanyName","createdByImpersonateId","createdByImpersonateName","createdByApiKeyId","createdByApiKeyLabel","updatedAt","updatedByUserId","updatedByUserName","updatedByCompanyId","updatedByCompanyName","updatedByImpersonateId","updatedByImpersonateName","updatedByApiKeyId","updatedByApiKeyLabel","deliveryDate","isInternal","buyerCompanyId","supplierCompanyId","receiverCompanyId","tracingAttachmentTemplateId","scDocCompletionPercentage","docCompletionPercentage","totalUploadedDocumentTypes","totalRequiredDocumentTypes","tracingOrderTags","lastProductionProcessId","tracingAttachmentTemplateName","orderType","lastProductionProcessName","color","depthLevel"],"additionalProperties":{}}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/orders/purchases/styles":{"get":{"tags":["Order Tracing - Purchase Orders"],"description":"Get all unique styles referenced in purchase orders","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/orders/purchases/by-node":{"get":{"tags":["Order Tracing - Purchase Orders"],"description":"Purchase order list by nodeId.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"orderId","required":false},{"schema":{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER"]},"in":"query","name":"type","required":false},{"schema":{"type":"string"},"in":"query","name":"nodeId","required":true},{"schema":{"type":"string"},"in":"query","name":"supplierCompanyId","required":false},{"schema":{"default":"false","anyOf":[{"type":"string"},{"type":"boolean"}]},"in":"query","name":"isArchived","required":false},{"schema":{"default":"false","anyOf":[{"type":"string"},{"type":"boolean"}]},"in":"query","name":"withoutPurchaseOrderNumber","required":false},{"schema":{"default":"false","anyOf":[{"type":"string"},{"type":"boolean"}]},"in":"query","name":"isInternal","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/orders/purchases/{id}":{"get":{"tags":["Order Tracing - Purchase Orders"],"description":"Get purchase order detail by id","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"aiSummary":{"nullable":true}},"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"put":{"tags":["Order Tracing - Purchase Orders"],"description":"Comprehensive update of a purchase order with documents and products","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orderNumber":{"type":"string","minLength":1},"attachmentTemplateId":{"type":"string","minLength":1},"buyer":{"type":"object","properties":{"id":{"type":"string","minLength":1},"facilityProcesses":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["id","facilityProcesses"]},"supplier":{"type":"object","properties":{"id":{"type":"string","minLength":1},"facilityProcesses":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["id","facilityProcesses"]},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"nullable":true,"type":"string","minLength":1},"styleId":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unit":{"type":"string"},"secondaryUnit":{"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"}},"required":["styleId","quantity","unit"]}},"source":{"nullable":true,"type":"string","minLength":1},"orderTypeId":{"nullable":true,"type":"string","minLength":1},"orderTags":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"orderDate":{"nullable":true},"deliveryDate":{"nullable":true},"agreedDeliveryDate":{"nullable":true},"attachments":{"type":"array","items":{"type":"object","properties":{"fileId":{"nullable":true,"type":"string","minLength":1},"type":{"type":"string"},"name":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"documentId":{"nullable":true,"type":"string","minLength":1}},"required":["type"]}},"receiver":{"nullable":true,"type":"object","properties":{"id":{"type":"string","minLength":1},"facilityProcesses":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["id","facilityProcesses"]},"responsibleUserIds":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"responsibleUserEmails":{"nullable":true,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"status":{"nullable":true,"type":"string"}},"required":["orderNumber","attachmentTemplateId","buyer","supplier","lines"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"tracingOrderId":{"type":"string"},"orderNumber":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"status":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"agreedDeliveryDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"isArchived":{"type":"boolean"},"tracingSalesOrderNumber":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByImpersonateName":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"deliveryDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"isInternal":{"type":"boolean"},"buyerCompanyId":{"type":"string"},"supplierCompanyId":{"type":"string"},"receiverCompanyId":{"type":"string"},"tracingAttachmentTemplateId":{"nullable":true,"type":"string"},"scDocCompletionPercentage":{"nullable":true,"type":"number"},"docCompletionPercentage":{"nullable":true,"type":"number"},"totalUploadedDocumentTypes":{"nullable":true,"type":"number"},"totalRequiredDocumentTypes":{"nullable":true,"type":"number"},"tracingOrderTags":{"nullable":true,"type":"string"},"lastProductionProcessId":{"nullable":true,"type":"string"},"tracingAttachmentTemplateName":{"nullable":true,"type":"string"},"orderType":{"nullable":true,"type":"string"},"lastProductionProcessName":{"nullable":true,"type":"string"},"color":{"nullable":true,"type":"string"},"depthLevel":{"nullable":true,"type":"number"},"originTracingNodeId":{"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"receiverTracingNodeId":{"nullable":true,"type":"string"},"productIds":{"nullable":true,"type":"string"},"tracingOrderTypeId":{"nullable":true,"type":"string"}},"required":["id","tracingOrderId","orderNumber","companyId","status","orderDate","agreedDeliveryDate","isArchived","tracingSalesOrderNumber","createdAt","createdByUserId","createdByUserName","createdByCompanyId","createdByCompanyName","createdByImpersonateId","createdByImpersonateName","createdByApiKeyId","createdByApiKeyLabel","updatedAt","updatedByUserId","updatedByUserName","updatedByCompanyId","updatedByCompanyName","updatedByImpersonateId","updatedByImpersonateName","updatedByApiKeyId","updatedByApiKeyLabel","deliveryDate","isInternal","buyerCompanyId","supplierCompanyId","receiverCompanyId","tracingAttachmentTemplateId","scDocCompletionPercentage","docCompletionPercentage","totalUploadedDocumentTypes","totalRequiredDocumentTypes","tracingOrderTags","lastProductionProcessId","tracingAttachmentTemplateName","orderType","lastProductionProcessName","color","depthLevel","originTracingNodeId","destinationTracingNodeId","receiverTracingNodeId","productIds","tracingOrderTypeId"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/orders/purchases":{"post":{"tags":["Order Tracing - Purchase Orders"],"description":"Create a purchase order","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orderNumber":{"type":"string","minLength":1},"attachmentTemplateId":{"type":"string","minLength":1},"buyer":{"type":"object","properties":{"id":{"type":"string","minLength":1},"facilityProcesses":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["id","facilityProcesses"]},"supplier":{"type":"object","properties":{"id":{"type":"string","minLength":1},"facilityProcesses":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["id","facilityProcesses"]},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"nullable":true,"type":"string","minLength":1},"styleId":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unit":{"type":"string"},"secondaryUnit":{"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"}},"required":["styleId","quantity","unit"]}},"source":{"nullable":true,"type":"string","enum":["nuvo","public-api"]},"orderTypeId":{"nullable":true,"type":"string","minLength":1},"orderTags":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"orderDate":{"nullable":true},"deliveryDate":{"nullable":true},"agreedDeliveryDate":{"nullable":true},"attachments":{"type":"array","items":{"type":"object","properties":{"fileId":{"nullable":true,"type":"string","minLength":1},"type":{"type":"string"},"name":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"documentId":{"nullable":true,"type":"string","minLength":1}},"required":["type"]}},"receiver":{"nullable":true,"type":"object","properties":{"id":{"type":"string","minLength":1},"facilityProcesses":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["id","facilityProcesses"]},"responsibleUserIds":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"responsibleUserEmails":{"nullable":true,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"status":{"nullable":true,"type":"string","enum":["IN_PROGRESS","IN_REVIEW","COMPLETED"]}},"required":["orderNumber","attachmentTemplateId","buyer","supplier","lines"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"tracingOrderId":{"type":"string"},"orderNumber":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"status":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"agreedDeliveryDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"isArchived":{"type":"boolean"},"tracingSalesOrderNumber":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByImpersonateName":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"deliveryDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"isInternal":{"type":"boolean"},"buyerCompanyId":{"type":"string"},"supplierCompanyId":{"type":"string"},"receiverCompanyId":{"type":"string"},"tracingAttachmentTemplateId":{"nullable":true,"type":"string"},"scDocCompletionPercentage":{"nullable":true,"type":"number"},"docCompletionPercentage":{"nullable":true,"type":"number"},"totalUploadedDocumentTypes":{"nullable":true,"type":"number"},"totalRequiredDocumentTypes":{"nullable":true,"type":"number"},"tracingOrderTags":{"nullable":true,"type":"string"},"lastProductionProcessId":{"nullable":true,"type":"string"},"tracingAttachmentTemplateName":{"nullable":true,"type":"string"},"orderType":{"nullable":true,"type":"string"},"lastProductionProcessName":{"nullable":true,"type":"string"},"color":{"nullable":true,"type":"string"},"depthLevel":{"nullable":true,"type":"number"},"originTracingNodeId":{"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"receiverTracingNodeId":{"nullable":true,"type":"string"},"productIds":{"nullable":true,"type":"string"},"tracingOrderTypeId":{"nullable":true,"type":"string"}},"required":["id","tracingOrderId","orderNumber","companyId","status","orderDate","agreedDeliveryDate","isArchived","tracingSalesOrderNumber","createdAt","createdByUserId","createdByUserName","createdByCompanyId","createdByCompanyName","createdByImpersonateId","createdByImpersonateName","createdByApiKeyId","createdByApiKeyLabel","updatedAt","updatedByUserId","updatedByUserName","updatedByCompanyId","updatedByCompanyName","updatedByImpersonateId","updatedByImpersonateName","updatedByApiKeyId","updatedByApiKeyLabel","deliveryDate","isInternal","buyerCompanyId","supplierCompanyId","receiverCompanyId","tracingAttachmentTemplateId","scDocCompletionPercentage","docCompletionPercentage","totalUploadedDocumentTypes","totalRequiredDocumentTypes","tracingOrderTags","lastProductionProcessId","tracingAttachmentTemplateName","orderType","lastProductionProcessName","color","depthLevel","originTracingNodeId","destinationTracingNodeId","receiverTracingNodeId","productIds","tracingOrderTypeId"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/orders/purchases/tags":{"get":{"tags":["Order Tracing - Purchase Orders"],"description":"Get all distinct tags used across purchase orders","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/orders/purchases/{id}/attachments":{"get":{"tags":["Order Tracing - Purchase Orders"],"description":"Get purchase order detail with all attachments of its tracing.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/orders/sales/list":{"post":{"tags":["Order Tracing - Sales Orders"],"description":"List sales orders","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"updatedAt","type":"string","enum":["updatedAt","createdAt","orderNumber","orderDate","agreedDeliveryDate","status","docCompletionPercentage","deliveryDate","scDocCompletionPercentage","lastProductionProcessId","tags","orderType","tracingAttachmentTemplateName"]},"filter":{"type":"string","maxLength":512},"isArchived":{"default":"false","anyOf":[{"type":"string"},{"type":"boolean"}]},"hasOrderNumber":{"default":"false","anyOf":[{"type":"string"},{"type":"boolean"}]},"orderNumber":{"type":"string","maxLength":512},"tracingPurchaseOrderNumber":{"type":"string","maxLength":512},"buyerCompanyId":{"type":"string"},"status":{"type":"string"},"lastProductionProcessId":{"type":"string"},"orderType":{"type":"string"},"receiverCompanyId":{"type":"string"},"tags":{"type":"string"},"productId":{"type":"string"}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tracingOrderId":{"type":"string"},"orderNumber":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"status":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"agreedDeliveryDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"isArchived":{"type":"boolean"},"tracingPurchaseOrderNumber":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByImpersonateName":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"deliveryDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"isInternal":{"type":"boolean"},"buyerCompanyId":{"type":"string"},"supplierCompanyId":{"type":"string"},"receiverCompanyId":{"type":"string"},"tracingAttachmentTemplateId":{"nullable":true,"type":"string"},"scDocCompletionPercentage":{"nullable":true,"type":"number"},"docCompletionPercentage":{"nullable":true,"type":"number"},"totalUploadedDocumentTypes":{"nullable":true,"type":"number"},"totalRequiredDocumentTypes":{"nullable":true,"type":"number"},"tracingOrderTags":{"nullable":true,"type":"string"},"lastProductionProcessId":{"nullable":true,"type":"string"},"tracingAttachmentTemplateName":{"nullable":true,"type":"string"},"orderType":{"nullable":true,"type":"string"},"lastProductionProcessName":{"nullable":true,"type":"string"},"color":{"nullable":true,"type":"string"},"depthLevel":{"nullable":true,"type":"number"},"aiSummary":{"nullable":true},"purchaseOrder":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"tracingOrderId":{"type":"string"},"orderNumber":{"nullable":true,"type":"string"},"orderType":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"status":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"agreedDeliveryDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"tracingSalesOrderNumber":{"nullable":true,"type":"string"},"buyerCompanyId":{"type":"string"},"supplierCompanyId":{"type":"string"},"receiverCompanyId":{"nullable":true,"type":"string"},"isInternal":{"anyOf":[{"type":"number"},{"type":"boolean"}]},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"receiverTracingNodeId":{"nullable":true,"type":"string"}},"required":["id","tracingOrderId","orderNumber","orderType","companyId","status","orderDate","agreedDeliveryDate","tracingSalesOrderNumber","buyerCompanyId","supplierCompanyId","receiverCompanyId","isInternal","originTracingNodeId","destinationTracingNodeId","receiverTracingNodeId"],"additionalProperties":{}},"linkedPurchaseOrders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tracingSalesOrderId":{"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"receiverTracingNodeId":{"nullable":true,"type":"string"},"orderNumber":{"nullable":true,"type":"string"},"isInternal":{"anyOf":[{"type":"number"},{"type":"boolean"}]},"buyerCompanyId":{"type":"string"},"supplierCompanyId":{"type":"string"},"receiverCompanyId":{"nullable":true,"type":"string"}},"required":["id","tracingSalesOrderId","originTracingNodeId","destinationTracingNodeId","receiverTracingNodeId","orderNumber","isInternal","buyerCompanyId","supplierCompanyId","receiverCompanyId"],"additionalProperties":{}}},"buyerCompany":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id","officialName","name","country","featuredImageFileId"],"additionalProperties":{}},"supplierCompany":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id","officialName","name","country","featuredImageFileId"],"additionalProperties":{}},"receiverCompany":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"}},"required":["id","officialName","name","country","featuredImageFileId"],"additionalProperties":{}},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tracingSalesOrderId":{"type":"string"},"styleId":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"unit":{"nullable":true,"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"tracingPurchaseOrderLineId":{"nullable":true,"type":"string"},"tracingPurchaseOrderLineStyleId":{"nullable":true,"type":"string"},"deprecatedProductId":{"nullable":true,"type":"string"},"isProductLinked":{"type":"boolean"},"product":{"nullable":true}},"required":["id","tracingSalesOrderId","styleId","quantity","unit","secondaryQuantity","secondaryUnit","tracingPurchaseOrderLineId","tracingPurchaseOrderLineStyleId","deprecatedProductId","isProductLinked","product"],"additionalProperties":{}}}},"required":["id","tracingOrderId","orderNumber","companyId","status","orderDate","agreedDeliveryDate","isArchived","tracingPurchaseOrderNumber","createdAt","createdByUserId","createdByUserName","createdByCompanyId","createdByCompanyName","createdByImpersonateId","createdByImpersonateName","createdByApiKeyId","createdByApiKeyLabel","updatedAt","updatedByUserId","updatedByUserName","updatedByCompanyId","updatedByCompanyName","updatedByImpersonateId","updatedByImpersonateName","updatedByApiKeyId","updatedByApiKeyLabel","deliveryDate","isInternal","buyerCompanyId","supplierCompanyId","receiverCompanyId","tracingAttachmentTemplateId","scDocCompletionPercentage","docCompletionPercentage","totalUploadedDocumentTypes","totalRequiredDocumentTypes","tracingOrderTags","lastProductionProcessId","tracingAttachmentTemplateName","orderType","lastProductionProcessName","color","depthLevel"],"additionalProperties":{}}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/orders/sales/styles":{"get":{"tags":["Order Tracing - Sales Orders"],"description":"Get all unique styles referenced in sales orders","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/orders/sales/{id}/attachments":{"get":{"tags":["Order Tracing - Sales Orders"],"description":"Get sales order detail with all attachments of its tracing.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/orders/sales/{id}":{"get":{"tags":["Order Tracing - Sales Orders"],"description":"Get sales order by ID","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"aiSummary":{"nullable":true}},"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"put":{"tags":["Order Tracing - Sales Orders"],"description":"Comprehensive update of a sales order with documents, lines, and attachments","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orderNumber":{"type":"string","minLength":1},"attachmentTemplateId":{"type":"string","minLength":1},"buyer":{"type":"object","properties":{"id":{"type":"string","minLength":1},"facilityProcesses":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["id","facilityProcesses"]},"supplier":{"type":"object","properties":{"id":{"type":"string","minLength":1},"facilityProcesses":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["id","facilityProcesses"]},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"nullable":true,"type":"string","minLength":1},"styleId":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unit":{"type":"string"},"secondaryUnit":{"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"}},"required":["styleId","quantity","unit"]}},"source":{"nullable":true,"type":"string","minLength":1},"orderTypeId":{"nullable":true,"type":"string","minLength":1},"orderTags":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"orderDate":{"nullable":true},"deliveryDate":{"nullable":true},"agreedDeliveryDate":{"nullable":true},"attachments":{"type":"array","items":{"type":"object","properties":{"fileId":{"nullable":true,"type":"string","minLength":1},"type":{"type":"string"},"name":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"documentId":{"nullable":true,"type":"string","minLength":1}},"required":["type"]}},"receiver":{"nullable":true,"type":"object","properties":{"id":{"type":"string","minLength":1},"facilityProcesses":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["id","facilityProcesses"]},"responsibleUserIds":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"responsibleUserEmails":{"nullable":true,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"status":{"nullable":true,"type":"string"}},"required":["orderNumber","attachmentTemplateId","buyer","supplier","lines"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"tracingOrderId":{"type":"string"},"orderNumber":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"status":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"agreedDeliveryDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"isArchived":{"type":"boolean"},"tracingPurchaseOrderNumber":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByImpersonateName":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"deliveryDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"isInternal":{"type":"boolean"},"buyerCompanyId":{"type":"string"},"supplierCompanyId":{"type":"string"},"receiverCompanyId":{"type":"string"},"tracingAttachmentTemplateId":{"nullable":true,"type":"string"},"scDocCompletionPercentage":{"nullable":true,"type":"number"},"docCompletionPercentage":{"nullable":true,"type":"number"},"totalUploadedDocumentTypes":{"nullable":true,"type":"number"},"totalRequiredDocumentTypes":{"nullable":true,"type":"number"},"tracingOrderTags":{"nullable":true,"type":"string"},"lastProductionProcessId":{"nullable":true,"type":"string"},"tracingAttachmentTemplateName":{"nullable":true,"type":"string"},"orderType":{"nullable":true,"type":"string"},"lastProductionProcessName":{"nullable":true,"type":"string"},"color":{"nullable":true,"type":"string"},"depthLevel":{"nullable":true,"type":"number"},"originTracingNodeId":{"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"receiverTracingNodeId":{"nullable":true,"type":"string"},"productIds":{"nullable":true,"type":"string"},"tracingOrderTypeId":{"nullable":true,"type":"string"}},"required":["id","tracingOrderId","orderNumber","companyId","status","orderDate","agreedDeliveryDate","isArchived","tracingPurchaseOrderNumber","createdAt","createdByUserId","createdByUserName","createdByCompanyId","createdByCompanyName","createdByImpersonateId","createdByImpersonateName","createdByApiKeyId","createdByApiKeyLabel","updatedAt","updatedByUserId","updatedByUserName","updatedByCompanyId","updatedByCompanyName","updatedByImpersonateId","updatedByImpersonateName","updatedByApiKeyId","updatedByApiKeyLabel","deliveryDate","isInternal","buyerCompanyId","supplierCompanyId","receiverCompanyId","tracingAttachmentTemplateId","scDocCompletionPercentage","docCompletionPercentage","totalUploadedDocumentTypes","totalRequiredDocumentTypes","tracingOrderTags","lastProductionProcessId","tracingAttachmentTemplateName","orderType","lastProductionProcessName","color","depthLevel","originTracingNodeId","destinationTracingNodeId","receiverTracingNodeId","productIds","tracingOrderTypeId"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/orders/sales/":{"post":{"tags":["Order Tracing - Sales Orders"],"description":"Create a sales order","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orderNumber":{"type":"string","minLength":1},"attachmentTemplateId":{"type":"string","minLength":1},"buyer":{"type":"object","properties":{"id":{"type":"string","minLength":1},"facilityProcesses":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["id","facilityProcesses"]},"supplier":{"type":"object","properties":{"id":{"type":"string","minLength":1},"facilityProcesses":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["id","facilityProcesses"]},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"nullable":true,"type":"string","minLength":1},"styleId":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unit":{"type":"string"},"secondaryUnit":{"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"}},"required":["styleId","quantity","unit"]}},"source":{"nullable":true,"type":"string","enum":["nuvo","public-api"]},"orderTypeId":{"nullable":true,"type":"string","minLength":1},"orderTags":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"orderDate":{"nullable":true},"deliveryDate":{"nullable":true},"agreedDeliveryDate":{"nullable":true},"attachments":{"type":"array","items":{"type":"object","properties":{"fileId":{"nullable":true,"type":"string","minLength":1},"type":{"type":"string"},"name":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"documentId":{"nullable":true,"type":"string","minLength":1}},"required":["type"]}},"receiver":{"nullable":true,"type":"object","properties":{"id":{"type":"string","minLength":1},"facilityProcesses":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["id","facilityProcesses"]},"responsibleUserIds":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"responsibleUserEmails":{"nullable":true,"type":"array","items":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"status":{"nullable":true,"type":"string","enum":["IN_PROGRESS","IN_REVIEW","COMPLETED"]}},"required":["orderNumber","attachmentTemplateId","buyer","supplier","lines"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"tracingOrderId":{"type":"string"},"orderNumber":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"status":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"agreedDeliveryDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"isArchived":{"type":"boolean"},"tracingPurchaseOrderNumber":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByImpersonateName":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"deliveryDate":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"isInternal":{"type":"boolean"},"buyerCompanyId":{"type":"string"},"supplierCompanyId":{"type":"string"},"receiverCompanyId":{"type":"string"},"tracingAttachmentTemplateId":{"nullable":true,"type":"string"},"scDocCompletionPercentage":{"nullable":true,"type":"number"},"docCompletionPercentage":{"nullable":true,"type":"number"},"totalUploadedDocumentTypes":{"nullable":true,"type":"number"},"totalRequiredDocumentTypes":{"nullable":true,"type":"number"},"tracingOrderTags":{"nullable":true,"type":"string"},"lastProductionProcessId":{"nullable":true,"type":"string"},"tracingAttachmentTemplateName":{"nullable":true,"type":"string"},"orderType":{"nullable":true,"type":"string"},"lastProductionProcessName":{"nullable":true,"type":"string"},"color":{"nullable":true,"type":"string"},"depthLevel":{"nullable":true,"type":"number"},"originTracingNodeId":{"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"receiverTracingNodeId":{"nullable":true,"type":"string"},"productIds":{"nullable":true,"type":"string"},"tracingOrderTypeId":{"nullable":true,"type":"string"}},"required":["id","tracingOrderId","orderNumber","companyId","status","orderDate","agreedDeliveryDate","isArchived","tracingPurchaseOrderNumber","createdAt","createdByUserId","createdByUserName","createdByCompanyId","createdByCompanyName","createdByImpersonateId","createdByImpersonateName","createdByApiKeyId","createdByApiKeyLabel","updatedAt","updatedByUserId","updatedByUserName","updatedByCompanyId","updatedByCompanyName","updatedByImpersonateId","updatedByImpersonateName","updatedByApiKeyId","updatedByApiKeyLabel","deliveryDate","isInternal","buyerCompanyId","supplierCompanyId","receiverCompanyId","tracingAttachmentTemplateId","scDocCompletionPercentage","docCompletionPercentage","totalUploadedDocumentTypes","totalRequiredDocumentTypes","tracingOrderTags","lastProductionProcessId","tracingAttachmentTemplateName","orderType","lastProductionProcessName","color","depthLevel","originTracingNodeId","destinationTracingNodeId","receiverTracingNodeId","productIds","tracingOrderTypeId"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/orders/internal/list":{"post":{"tags":["Order Tracing - Internal Orders"],"description":"List internal orders","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"description":"Number of results per page. The default and maximum vary per endpoint.","type":"integer","minimum":1,"maximum":500},"page":{"description":"Page number (1-based). Defaults to 1.","type":"integer","minimum":1,"maximum":9007199254740991},"order":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"sort":{"default":"updatedAt","type":"string","enum":["updatedAt","createdAt","orderNumber","orderDate","agreedDeliveryDate","status","docCompletionPercentage","deliveryDate","scDocCompletionPercentage","lastProductionProcessId","tags","orderType","tracingAttachmentTemplateName"]},"filter":{"type":"string","maxLength":512},"isArchived":{"type":"boolean"},"hasOrderNumber":{"type":"boolean"},"orderNumber":{"type":"string","maxLength":512},"supplierCompanyId":{"type":"string"},"buyerCompanyId":{"type":"string"},"status":{"type":"string"},"lastProductionProcessId":{"type":"string"},"orderType":{"type":"string"},"tags":{"type":"string"},"productId":{"type":"string"}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/orders/trace/purchases/{id}":{"get":{"tags":["Order Tracing - Trace"],"description":"Get tracing graph by purchase order id.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/orders/trace/sales/{id}":{"get":{"tags":["Order Tracing - Trace"],"description":"Get tracing graph by sales order id.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/orders/trace/purchase/bulk-export":{"post":{"tags":["Order Tracing - Trace"],"description":"Export bulk purchase orders","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orderIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["orderIds"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"url":{"type":"string"},"filename":{"type":"string"}},"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/orders/trace/sales/bulk-export":{"post":{"tags":["Order Tracing - Trace"],"description":"Export bulk sales orders","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orderIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["orderIds"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"url":{"type":"string"},"filename":{"type":"string"}},"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/orders/trace/product-trace/purchases/{id}":{"get":{"tags":["Order Tracing - Trace"],"description":"Get product tracing by purchase order id","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"layers":{},"links":{},"meta":{},"order":{}},"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/orders/trace/product-trace/sales/{id}":{"get":{"tags":["Order Tracing - Trace"],"description":"Get product tracing by sales order id","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"layers":{},"links":{},"meta":{},"order":{}},"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/orders/order-lines/product-linking":{"post":{"tags":["Order Tracing - Order Lines"],"description":"Create an order line product linking","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"productId":{"type":"string","minLength":1},"meta":{"type":"object","properties":{"type":{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER"]},"orderLineId":{"type":"string","minLength":1}},"required":["type","orderLineId"]}},"required":["productId","meta"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/orders/calculations/product-stories":{"post":{"tags":["Order Tracing - Calculations"],"description":"Recalculate product stories","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["ids"]}}}},"parameters":[{"schema":{"type":"boolean"},"in":"query","name":"isProductComponent","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/orders/calculations/product-kg":{"post":{"tags":["Order Tracing - Calculations"],"description":"Calculate the quantity in KG","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"productId":{"type":"string","minLength":1},"quantity":{"type":"number"},"unit":{"type":"string"}},"required":["productId","quantity"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"quantity":{"type":"number"},"unit":{"type":"string"}},"required":["quantity"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/transactions/attach-existing-order":{"post":{"tags":["OrderTracing - Transactions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"nodeId":{"type":"string"},"purchaseOrderId":{"type":"string"},"meta":{"type":"object","properties":{"orderId":{"type":"string"},"type":{"type":"string"}},"required":["orderId","type"]}},"required":["nodeId","purchaseOrderId","meta"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"layers":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"number"}]},"position":{"nullable":true,"type":"number"},"productionProcess":{"nullable":true,"anyOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"}},"required":["id"],"additionalProperties":{}}]},"nodes":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"}},"required":["id"],"additionalProperties":{}}]}},"featuredFacilityProcess":{"nullable":true,"anyOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"}},"required":["id"],"additionalProperties":{}}]},"productionProcess":{"nullable":true,"anyOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"}},"required":["id"],"additionalProperties":{}}]},"hasSupplier":{"nullable":true,"type":"boolean"},"canTransformProduct":{"nullable":true,"type":"boolean"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"sku":{"nullable":true,"type":"string"},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"lineId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}}}},"required":["id"],"additionalProperties":{}}}},"required":["id"],"additionalProperties":{}}},"links":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"isOriginCountry":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]},"isInternal":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]},"isConnected":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]}},"required":["id"],"additionalProperties":{}}},"meta":{"nullable":true,"type":"object","properties":{"orderId":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"attachmentTemplateId":{"nullable":true,"type":"string"},"traceType":{"nullable":true,"type":"string"},"order":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"deliveryDate":{"nullable":true,"type":"string","format":"date-time"},"orderType":{"nullable":true,"type":"string"},"tracingOrderTags":{"nullable":true},"orderNumber":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"type":"string","format":"date-time"},"tracingOrderId":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"receiverTracingNodeId":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"agreedDeliveryDate":{"nullable":true,"type":"string","format":"date-time"},"tracingSalesOrderNumber":{"nullable":true,"type":"string"},"buyerCompanyId":{"nullable":true,"type":"string"},"supplierCompanyId":{"nullable":true,"type":"string"},"receiverCompanyId":{"nullable":true,"type":"string"},"tracingAttachmentTemplateId":{"nullable":true,"type":"string"},"scDocCompletionPercentage":{"nullable":true,"type":"number"},"docCompletionPercentage":{"nullable":true,"type":"number"},"lastProductionProcessId":{"nullable":true,"type":"string"},"totalUploadedDocumentTypes":{"nullable":true,"type":"number"},"totalRequiredDocumentTypes":{"nullable":true,"type":"number"},"lastProductionProcessName":{"nullable":true,"type":"string"},"isInternal":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]},"color":{"nullable":true,"type":"string"},"depthLevel":{"nullable":true,"type":"number"},"attachmentTemplate":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"tracingType":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"isActive":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]}},"required":["id"],"additionalProperties":{}},"lines":{"nullable":true,"type":"array","items":{}},"salesOrder":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"type":"string","format":"date-time"},"deliveryDate":{"nullable":true,"type":"string","format":"date-time"},"buyerCompanyId":{"nullable":true,"type":"string"},"supplierCompanyId":{"nullable":true,"type":"string"},"receiverCompanyId":{"nullable":true,"type":"string"},"tracingOrderId":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"receiverTracingNodeId":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"agreedDeliveryDate":{"nullable":true,"type":"string","format":"date-time"},"tracingPurchaseOrderNumber":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}},"linkedSalesOrders":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"receiverTracingNodeId":{"nullable":true,"type":"string"},"tracingSalesOrderId":{"nullable":true,"type":"string"},"tracingPurchaseOrderId":{"nullable":true,"type":"string"},"isInternal":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]},"buyerCompanyId":{"nullable":true,"type":"string"},"supplierCompanyId":{"nullable":true,"type":"string"},"receiverCompanyId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}}},"buyerCompany":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{}}]}},"required":["id"],"additionalProperties":{}},"supplierCompany":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{}}]}},"required":["id"],"additionalProperties":{}},"receiverCompany":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{}}]}},"required":["id"],"additionalProperties":{}},"purchaseOrderResponsibleUsers":{"nullable":true,"type":"array","items":{}},"salesOrderResponsibleUsers":{"nullable":true,"type":"array","items":{}},"aiSummary":{"nullable":true}},"required":["id"],"additionalProperties":{}}},"additionalProperties":{}},"order":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"deliveryDate":{"nullable":true,"type":"string","format":"date-time"},"orderType":{"nullable":true,"type":"string"},"tracingOrderTags":{"nullable":true},"orderNumber":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"type":"string","format":"date-time"},"tracingOrderId":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"receiverTracingNodeId":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"agreedDeliveryDate":{"nullable":true,"type":"string","format":"date-time"},"tracingSalesOrderNumber":{"nullable":true,"type":"string"},"buyerCompanyId":{"nullable":true,"type":"string"},"supplierCompanyId":{"nullable":true,"type":"string"},"receiverCompanyId":{"nullable":true,"type":"string"},"tracingAttachmentTemplateId":{"nullable":true,"type":"string"},"scDocCompletionPercentage":{"nullable":true,"type":"number"},"docCompletionPercentage":{"nullable":true,"type":"number"},"lastProductionProcessId":{"nullable":true,"type":"string"},"totalUploadedDocumentTypes":{"nullable":true,"type":"number"},"totalRequiredDocumentTypes":{"nullable":true,"type":"number"},"lastProductionProcessName":{"nullable":true,"type":"string"},"isInternal":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]},"color":{"nullable":true,"type":"string"},"depthLevel":{"nullable":true,"type":"number"},"attachmentTemplate":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"tracingType":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"isActive":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]}},"required":["id"],"additionalProperties":{}},"lines":{"nullable":true,"type":"array","items":{}},"salesOrder":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"type":"string","format":"date-time"},"deliveryDate":{"nullable":true,"type":"string","format":"date-time"},"buyerCompanyId":{"nullable":true,"type":"string"},"supplierCompanyId":{"nullable":true,"type":"string"},"receiverCompanyId":{"nullable":true,"type":"string"},"tracingOrderId":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"receiverTracingNodeId":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"agreedDeliveryDate":{"nullable":true,"type":"string","format":"date-time"},"tracingPurchaseOrderNumber":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}},"linkedSalesOrders":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"receiverTracingNodeId":{"nullable":true,"type":"string"},"tracingSalesOrderId":{"nullable":true,"type":"string"},"tracingPurchaseOrderId":{"nullable":true,"type":"string"},"isInternal":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]},"buyerCompanyId":{"nullable":true,"type":"string"},"supplierCompanyId":{"nullable":true,"type":"string"},"receiverCompanyId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}}},"buyerCompany":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{}}]}},"required":["id"],"additionalProperties":{}},"supplierCompany":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{}}]}},"required":["id"],"additionalProperties":{}},"receiverCompany":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{}}]}},"required":["id"],"additionalProperties":{}},"purchaseOrderResponsibleUsers":{"nullable":true,"type":"array","items":{}},"salesOrderResponsibleUsers":{"nullable":true,"type":"array","items":{}},"aiSummary":{"nullable":true}},"required":["id"],"additionalProperties":{}}},"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/transactions/attach-link-documents":{"post":{"tags":["OrderTracing - Transactions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"linkId":{"type":"string"},"documents":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string"},"documentId":{"type":"string"},"type":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"meta":{"type":"object","additionalProperties":{}}},"required":["type"]}}},"required":["linkId","documents"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"linkTransaction":{"type":"object","properties":{"id":{"type":"string"},"linkId":{"type":"string"},"transactionType":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","linkId"],"additionalProperties":false},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"documentId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"reference":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"type":{"type":"string"},"fileId":{"nullable":true,"type":"string"},"fileName":{"nullable":true,"type":"string"},"fileType":{"nullable":true,"type":"string"},"fileContentType":{"nullable":true,"type":"string"},"fileUrl":{"nullable":true,"type":"string"},"synced":{"nullable":true,"type":"number"},"meta":{"nullable":true,"type":"object","additionalProperties":{}},"createdAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","type"],"additionalProperties":false}}},"required":["linkTransaction","documents"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/transactions/attach-node-documents":{"post":{"tags":["OrderTracing - Transactions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"nodeId":{"type":"string"},"documents":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string"},"documentId":{"type":"string"},"type":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"meta":{"type":"object","additionalProperties":{}}},"required":["type"]}}},"required":["nodeId","documents"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"documentId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"reference":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"type":{"type":"string"},"fileId":{"nullable":true,"type":"string"},"fileName":{"nullable":true,"type":"string"},"fileType":{"nullable":true,"type":"string"},"fileContentType":{"nullable":true,"type":"string"},"fileUrl":{"nullable":true,"type":"string"},"synced":{"nullable":true,"type":"number"},"meta":{"nullable":true,"type":"object","additionalProperties":{}},"createdAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","type"],"additionalProperties":false}}},"required":["documents"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/transactions/attach-order":{"post":{"tags":["OrderTracing - Transactions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"nodeId":{"type":"string","minLength":1},"meta":{"type":"object","properties":{"orderId":{"type":"string","minLength":1},"type":{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER","purchase_order","sales_order","purchase","sales"]},"attachmentTemplateId":{"type":"string"},"traceType":{"type":"string"}},"required":["orderId","type"]},"orderNumber":{"type":"string","minLength":1},"buyer":{"type":"object","properties":{"id":{"type":"string","minLength":1},"facilityProcesses":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["id","facilityProcesses"]},"supplier":{"type":"object","properties":{"id":{"type":"string","minLength":1},"facilityProcesses":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["id","facilityProcesses"]},"receiver":{"nullable":true,"type":"object","properties":{"id":{"type":"string","minLength":1},"facilityProcesses":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["id","facilityProcesses"]},"attachmentTemplateId":{"nullable":true,"type":"string","minLength":1},"orderTypeId":{"nullable":true,"type":"string"},"orderTags":{"type":"array","items":{"type":"string"}},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unit":{"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"type":"string"}},"required":["styleId","quantity","unit"]}},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"nullable":true,"type":"string"},"fileId":{"type":"string","minLength":1},"type":{"type":"string"},"name":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"fileUrl":{"type":"string"}},"required":["fileId","type"]}},"responsibleUserIds":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"responsibleUserEmails":{"nullable":true,"type":"array","items":{"type":"string","minLength":1}},"orderDate":{"nullable":true},"agreedDeliveryDate":{"nullable":true},"deliveryDate":{"nullable":true}},"required":["nodeId","meta","orderNumber","supplier","lines","attachments"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"layers":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"number"}]},"position":{"nullable":true,"type":"number"},"productionProcess":{"nullable":true,"anyOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"}},"required":["id"],"additionalProperties":{}}]},"nodes":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"}},"required":["id"],"additionalProperties":{}}]}},"featuredFacilityProcess":{"nullable":true,"anyOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"}},"required":["id"],"additionalProperties":{}}]},"productionProcess":{"nullable":true,"anyOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"}},"required":["id"],"additionalProperties":{}}]},"hasSupplier":{"nullable":true,"type":"boolean"},"canTransformProduct":{"nullable":true,"type":"boolean"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"sku":{"nullable":true,"type":"string"},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"lineId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}}}},"required":["id"],"additionalProperties":{}}}},"required":["id"],"additionalProperties":{}}},"links":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"isOriginCountry":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]},"isInternal":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]},"isConnected":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]}},"required":["id"],"additionalProperties":{}}},"meta":{"nullable":true,"type":"object","properties":{"orderId":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"attachmentTemplateId":{"nullable":true,"type":"string"},"traceType":{"nullable":true,"type":"string"},"order":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"deliveryDate":{"nullable":true,"type":"string","format":"date-time"},"orderType":{"nullable":true,"type":"string"},"tracingOrderTags":{"nullable":true},"orderNumber":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"type":"string","format":"date-time"},"tracingOrderId":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"receiverTracingNodeId":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"agreedDeliveryDate":{"nullable":true,"type":"string","format":"date-time"},"tracingSalesOrderNumber":{"nullable":true,"type":"string"},"buyerCompanyId":{"nullable":true,"type":"string"},"supplierCompanyId":{"nullable":true,"type":"string"},"receiverCompanyId":{"nullable":true,"type":"string"},"tracingAttachmentTemplateId":{"nullable":true,"type":"string"},"scDocCompletionPercentage":{"nullable":true,"type":"number"},"docCompletionPercentage":{"nullable":true,"type":"number"},"lastProductionProcessId":{"nullable":true,"type":"string"},"totalUploadedDocumentTypes":{"nullable":true,"type":"number"},"totalRequiredDocumentTypes":{"nullable":true,"type":"number"},"lastProductionProcessName":{"nullable":true,"type":"string"},"isInternal":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]},"color":{"nullable":true,"type":"string"},"depthLevel":{"nullable":true,"type":"number"},"attachmentTemplate":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"tracingType":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"isActive":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]}},"required":["id"],"additionalProperties":{}},"lines":{"nullable":true,"type":"array","items":{}},"salesOrder":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"type":"string","format":"date-time"},"deliveryDate":{"nullable":true,"type":"string","format":"date-time"},"buyerCompanyId":{"nullable":true,"type":"string"},"supplierCompanyId":{"nullable":true,"type":"string"},"receiverCompanyId":{"nullable":true,"type":"string"},"tracingOrderId":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"receiverTracingNodeId":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"agreedDeliveryDate":{"nullable":true,"type":"string","format":"date-time"},"tracingPurchaseOrderNumber":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}},"linkedSalesOrders":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"receiverTracingNodeId":{"nullable":true,"type":"string"},"tracingSalesOrderId":{"nullable":true,"type":"string"},"tracingPurchaseOrderId":{"nullable":true,"type":"string"},"isInternal":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]},"buyerCompanyId":{"nullable":true,"type":"string"},"supplierCompanyId":{"nullable":true,"type":"string"},"receiverCompanyId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}}},"buyerCompany":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{}}]}},"required":["id"],"additionalProperties":{}},"supplierCompany":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{}}]}},"required":["id"],"additionalProperties":{}},"receiverCompany":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{}}]}},"required":["id"],"additionalProperties":{}},"purchaseOrderResponsibleUsers":{"nullable":true,"type":"array","items":{}},"salesOrderResponsibleUsers":{"nullable":true,"type":"array","items":{}},"aiSummary":{"nullable":true}},"required":["id"],"additionalProperties":{}}},"additionalProperties":{}},"order":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"deliveryDate":{"nullable":true,"type":"string","format":"date-time"},"orderType":{"nullable":true,"type":"string"},"tracingOrderTags":{"nullable":true},"orderNumber":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"type":"string","format":"date-time"},"tracingOrderId":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"receiverTracingNodeId":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"agreedDeliveryDate":{"nullable":true,"type":"string","format":"date-time"},"tracingSalesOrderNumber":{"nullable":true,"type":"string"},"buyerCompanyId":{"nullable":true,"type":"string"},"supplierCompanyId":{"nullable":true,"type":"string"},"receiverCompanyId":{"nullable":true,"type":"string"},"tracingAttachmentTemplateId":{"nullable":true,"type":"string"},"scDocCompletionPercentage":{"nullable":true,"type":"number"},"docCompletionPercentage":{"nullable":true,"type":"number"},"lastProductionProcessId":{"nullable":true,"type":"string"},"totalUploadedDocumentTypes":{"nullable":true,"type":"number"},"totalRequiredDocumentTypes":{"nullable":true,"type":"number"},"lastProductionProcessName":{"nullable":true,"type":"string"},"isInternal":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]},"color":{"nullable":true,"type":"string"},"depthLevel":{"nullable":true,"type":"number"},"attachmentTemplate":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"tracingType":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"isActive":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]}},"required":["id"],"additionalProperties":{}},"lines":{"nullable":true,"type":"array","items":{}},"salesOrder":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"type":"string","format":"date-time"},"deliveryDate":{"nullable":true,"type":"string","format":"date-time"},"buyerCompanyId":{"nullable":true,"type":"string"},"supplierCompanyId":{"nullable":true,"type":"string"},"receiverCompanyId":{"nullable":true,"type":"string"},"tracingOrderId":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"receiverTracingNodeId":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"agreedDeliveryDate":{"nullable":true,"type":"string","format":"date-time"},"tracingPurchaseOrderNumber":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}},"linkedSalesOrders":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"receiverTracingNodeId":{"nullable":true,"type":"string"},"tracingSalesOrderId":{"nullable":true,"type":"string"},"tracingPurchaseOrderId":{"nullable":true,"type":"string"},"isInternal":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]},"buyerCompanyId":{"nullable":true,"type":"string"},"supplierCompanyId":{"nullable":true,"type":"string"},"receiverCompanyId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}}},"buyerCompany":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{}}]}},"required":["id"],"additionalProperties":{}},"supplierCompany":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{}}]}},"required":["id"],"additionalProperties":{}},"receiverCompany":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"anyOf":[{"type":"string"},{"type":"array","items":{}}]}},"required":["id"],"additionalProperties":{}},"purchaseOrderResponsibleUsers":{"nullable":true,"type":"array","items":{}},"salesOrderResponsibleUsers":{"nullable":true,"type":"array","items":{}},"aiSummary":{"nullable":true}},"required":["id"],"additionalProperties":{}}},"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/transactions/attach-origin":{"post":{"tags":["OrderTracing - Transactions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"nodeId":{"type":"string","minLength":1},"meta":{"type":"object","properties":{"orderId":{"type":"string","minLength":1},"type":{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER"]}},"required":["orderId","type"]},"facilityProcesses":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"countryCode":{"type":"string"},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unit":{"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"type":"string"}},"required":["styleId","quantity","unit"]}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"nullable":true,"type":"string"},"fileId":{"type":"string","minLength":1},"type":{"type":"string"},"name":{"type":"string"},"reference":{"type":"string"},"description":{"type":"string"},"fileUrl":{"type":"string"}},"required":["fileId","type"]}},"attachmentTemplateId":{"nullable":true,"type":"string","minLength":1}},"required":["nodeId","meta","facilityProcesses","lines","documents"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/transactions/product-transformation":{"post":{"tags":["OrderTracing - Transactions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"session":{"nullable":true,"type":"object","properties":{"productionStartDate":{"nullable":true},"productionEndDate":{"nullable":true},"productionProcess":{"type":"string","minLength":1},"wastageFactorPercentage":{"type":"number","minimum":0}},"required":["productionProcess","wastageFactorPercentage"]},"inputs":{"minItems":1,"type":"array","items":{"type":"object","properties":{"orderLineId":{"type":"string","minLength":1},"nodeId":{"type":"string","minLength":1},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"unit":{"type":"string"},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"secondaryUnit":{"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"}},"required":["name","unit","quantity"]}}},"required":["orderLineId","nodeId"]}},"output":{"type":"object","properties":{"orderLineId":{"type":"string","minLength":1},"nodeId":{"type":"string","minLength":1},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"unit":{"type":"string"},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"secondaryUnit":{"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"}},"required":["name","unit","quantity"]}}},"required":["orderLineId","nodeId"]},"meta":{"type":"object","properties":{"orderId":{"type":"string","minLength":1},"type":{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER"]}},"required":["orderId","type"]}},"required":["inputs","output","meta"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"layers":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"number"}]},"position":{"nullable":true,"type":"number"},"productionProcess":{"nullable":true,"anyOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"}},"required":["id"],"additionalProperties":{}}]},"nodes":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"}},"required":["id"],"additionalProperties":{}}]}},"featuredFacilityProcess":{"nullable":true,"anyOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"}},"required":["id"],"additionalProperties":{}}]},"productionProcess":{"nullable":true,"anyOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"}},"required":["id"],"additionalProperties":{}}]},"hasSupplier":{"nullable":true,"type":"boolean"},"canTransformProduct":{"nullable":true,"type":"boolean"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"sku":{"nullable":true,"type":"string"},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"lineId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}}}},"required":["id"],"additionalProperties":{}}}},"required":["id"],"additionalProperties":{}}},"links":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"isOriginCountry":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]},"isInternal":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]},"isConnected":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]}},"required":["id"],"additionalProperties":{}}},"productLinksGraph":{"nullable":true},"meta":{"nullable":true,"type":"object","properties":{"id":{"nullable":true,"type":"string"},"tracingPurchaseOrderId":{"nullable":true,"type":"string"},"tracingSalesOrderId":{"nullable":true,"type":"string"},"nodes":{"nullable":true,"type":"array","items":{"type":"string"}}},"additionalProperties":{}}},"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/transactions/bulk-product-transformation":{"post":{"tags":["OrderTracing - Transactions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"session":{"nullable":true,"type":"object","properties":{"productionStartDate":{"nullable":true},"productionEndDate":{"nullable":true},"productionProcess":{"type":"string","minLength":1},"wastageFactorPercentage":{"type":"number","minimum":0}},"required":["productionProcess","wastageFactorPercentage"]},"meta":{"type":"object","properties":{"orderId":{"type":"string","minLength":1},"type":{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER"]}},"required":["orderId","type"]},"transformations":{"minItems":1,"type":"array","items":{"type":"object","properties":{"inputs":{"minItems":1,"type":"array","items":{"type":"object","properties":{"orderLineId":{"type":"string","minLength":1},"nodeId":{"type":"string","minLength":1},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"unit":{"type":"string"},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"secondaryUnit":{"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"}},"required":["name","unit","quantity"]}}},"required":["orderLineId","nodeId"]}},"output":{"type":"object","properties":{"orderLineId":{"type":"string","minLength":1},"nodeId":{"type":"string","minLength":1},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"unit":{"type":"string"},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"secondaryUnit":{"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"}},"required":["name","unit","quantity"]}}},"required":["orderLineId","nodeId"]}},"required":["inputs","output"]}}},"required":["meta","transformations"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"layers":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"number"}]},"position":{"nullable":true,"type":"number"},"productionProcess":{"nullable":true,"anyOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"}},"required":["id"],"additionalProperties":{}}]},"nodes":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"assetCountry":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"}},"required":["id"],"additionalProperties":{}}]}},"featuredFacilityProcess":{"nullable":true,"anyOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"}},"required":["id"],"additionalProperties":{}}]},"productionProcess":{"nullable":true,"anyOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"}},"required":["id"],"additionalProperties":{}}]},"hasSupplier":{"nullable":true,"type":"boolean"},"canTransformProduct":{"nullable":true,"type":"boolean"},"producingProducts":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"sku":{"nullable":true,"type":"string"},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"lineId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}}}},"required":["id"],"additionalProperties":{}}}},"required":["id"],"additionalProperties":{}}},"links":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"originTracingNodeId":{"nullable":true,"type":"string"},"destinationTracingNodeId":{"nullable":true,"type":"string"},"isOriginCountry":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]},"isInternal":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]},"isConnected":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]}},"required":["id"],"additionalProperties":{}}},"productLinksGraph":{"nullable":true},"meta":{"nullable":true,"type":"object","properties":{"id":{"nullable":true,"type":"string"},"tracingPurchaseOrderId":{"nullable":true,"type":"string"},"tracingSalesOrderId":{"nullable":true,"type":"string"},"nodes":{"nullable":true,"type":"array","items":{"type":"string"}}},"additionalProperties":{}}},"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/transactions/remove-link-documents":{"post":{"tags":["OrderTracing - Transactions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"linkId":{"type":"string"},"documentIds":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["linkId","documentIds"]}}}},"responses":{"200":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/transactions/link/{id}":{"get":{"tags":["OrderTracing - Transactions"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/transactions/tracing-node-product-trace/{id}":{"get":{"tags":["OrderTracing - Transactions"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"nodeId":{"nullable":true,"type":"string"},"productId":{"nullable":true,"type":"string"},"traceData":{"nullable":true,"type":"object","additionalProperties":{}}},"required":["id"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/transactions/product-line-link/{id}":{"get":{"tags":["OrderTracing - Transactions"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"tracingLinkId":{"nullable":true,"type":"string"},"inputProductOrderLineId":{"nullable":true,"type":"string"},"outputProductOrderLineId":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"supplierCompany":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}},"outputProduct":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"sku":{"nullable":true,"type":"string"},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"lineId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}},"outputTransformations":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"nullable":true,"type":"string"},"tracingProductTransformationSessionId":{"nullable":true,"type":"string"},"inputProductOrderLineId":{"nullable":true,"type":"string"},"outputProductOrderLineId":{"nullable":true,"type":"string"},"isOriginInput":{"nullable":true,"type":"boolean"},"product":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"sku":{"nullable":true,"type":"string"},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"lineId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}},"productTransFormationSession":{"nullable":true,"type":"object","properties":{"productionStartDate":{"nullable":true,"type":"string","format":"date-time"},"productionEndDate":{"nullable":true,"type":"string","format":"date-time"},"productionProcess":{"type":"string","minLength":1},"wastageFactorPercentage":{"type":"number","minimum":0}},"required":["productionProcess","wastageFactorPercentage"],"additionalProperties":false}},"additionalProperties":{}}},"inputTransformations":{"nullable":true,"type":"array","items":{"type":"object","properties":{"id":{"nullable":true,"type":"string"},"tracingProductTransformationSessionId":{"nullable":true,"type":"string"},"inputProductOrderLineId":{"nullable":true,"type":"string"},"outputProductOrderLineId":{"nullable":true,"type":"string"},"isOriginInput":{"nullable":true,"type":"boolean"},"product":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"sku":{"nullable":true,"type":"string"},"unit":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"lineId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}},"productTransFormationSession":{"nullable":true,"type":"object","properties":{"productionStartDate":{"nullable":true,"type":"string","format":"date-time"},"productionEndDate":{"nullable":true,"type":"string","format":"date-time"},"productionProcess":{"type":"string","minLength":1},"wastageFactorPercentage":{"type":"number","minimum":0}},"required":["productionProcess","wastageFactorPercentage"],"additionalProperties":false}},"additionalProperties":{}}}},"required":["id"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/cascade-tracing/transactions/product-transformations/{nodeOrderlineId}":{"get":{"tags":["OrderTracing - Transactions"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"nodeOrderlineId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sourceNodeOrderlineId":{"nullable":true,"type":"string"},"targetNodeOrderlineId":{"nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"number"},"unit":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id"],"additionalProperties":{}}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/attachment-templates/":{"get":{"tags":["Attachment Templates"],"parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"anyOf":[{"type":"string"},{"type":"boolean"}]},"in":"query","name":"archived","required":false},{"schema":{"type":"string"},"in":"query","name":"name","required":false},{"schema":{"type":"string","enum":["PRODUCT_BACKWARD","FIBER_FORWARD","FIBER_PRODUCT_TRANSFORMATION"]},"in":"query","name":"tracingType","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"isGlobal":{"type":"boolean"},"isArchived":{"type":"boolean"},"isActive":{"type":"boolean"},"isPreference":{"type":"boolean"},"tracingType":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","description","companyId","isGlobal","isArchived","isActive","isPreference","tracingType","createdAt","updatedAt"],"additionalProperties":false}}},"required":["meta","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"post":{"tags":["Attachment Templates"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"nullable":true,"type":"string"},"tracingType":{"type":"string","minLength":1},"isActive":{"default":true,"type":"boolean"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"isBackupRule":{"default":false,"type":"boolean"},"idx":{"type":"integer","minimum":0,"maximum":9007199254740991},"facilityProcessIds":{"default":[],"type":"array","items":{"type":"string"}},"documents":{"default":[],"type":"array","items":{"type":"object","properties":{"documentType":{"type":"string","minLength":1},"isMandatory":{"type":"boolean"},"isAppliedToAllCountries":{"type":"boolean"},"idx":{"type":"integer","minimum":0,"maximum":9007199254740991},"countryCodes":{"default":[],"type":"array","items":{"type":"string"}}},"required":["documentType","isMandatory","isAppliedToAllCountries","idx"]}}},"required":["idx"]}}},"required":["name","tracingType"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"isGlobal":{"type":"boolean"},"isArchived":{"type":"boolean"},"isActive":{"type":"boolean"},"isPreference":{"type":"boolean"},"tracingType":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","description","companyId","isGlobal","isArchived","isActive","isPreference","tracingType","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/attachment-templates/aggregate":{"get":{"tags":["Attachment Templates"],"parameters":[{"schema":{"type":"string","enum":["PRODUCT_BACKWARD","FIBER_FORWARD"]},"in":"query","name":"templateType","required":true},{"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"name","required":false},{"schema":{"default":"all","type":"string","enum":["all","global","private","shared"]},"in":"query","name":"visibility","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"isGlobal":{"type":"boolean"},"isArchived":{"type":"boolean"},"isActive":{"type":"boolean"},"isPreference":{"type":"boolean"},"tracingType":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"owner":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"companyName":{"type":"string"}},"required":["id","companyName"],"additionalProperties":false}},"required":["id","name","description","companyId","isGlobal","isArchived","isActive","isPreference","tracingType","createdAt","updatedAt","owner"],"additionalProperties":false}}},"required":["meta","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/attachment-templates/documents":{"get":{"tags":["Attachment Templates"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"orderIds","required":true},{"schema":{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER"]},"in":"query","name":"tracingType","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"isGlobal":{"type":"boolean"},"isArchived":{"type":"boolean"},"isActive":{"type":"boolean"},"isPreference":{"type":"boolean"},"tracingType":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"rules":{"type":"array","items":{"type":"object","properties":{"facilityProcessId":{"type":"string"},"documentType":{"type":"string"},"title":{"nullable":true,"type":"string"},"documentClass":{"nullable":true,"type":"string","enum":["TRANSACTIONAL","COMPANY","PRODUCT"]},"isAppliedToAllCountries":{"type":"boolean"},"isMandatory":{"type":"boolean"},"countryCodes":{"type":"array","items":{"type":"string"}},"syncedDocument":{"nullable":true,"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fileId":{"type":"string"},"name":{"type":"string"}},"required":["id","fileId","name"],"additionalProperties":false}},"otherVersionsAvailable":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["documents","otherVersionsAvailable"],"additionalProperties":false}},"required":["facilityProcessId","documentType","title","documentClass","isAppliedToAllCountries","isMandatory","countryCodes"],"additionalProperties":false}},"orders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tracingAttachmentTemplateId":{"type":"string"},"originTracingNodeId":{"type":"string"},"destinationTracingNodeId":{"type":"string"},"traceType":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tracingTransactionId":{"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetType":{"nullable":true,"type":"string"},"transactionType":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"reference":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"fileId":{"nullable":true,"type":"string"},"fileName":{"nullable":true,"type":"string"},"fileType":{"nullable":true,"type":"string"},"fileContentType":{"nullable":true,"type":"string"},"fileUrl":{"nullable":true,"type":"string"}},"required":["id","tracingTransactionId","assetId","assetType","transactionType","name","reference","description","type","fileId","fileName","fileType","fileContentType","fileUrl"],"additionalProperties":false}}},"required":["id","tracingAttachmentTemplateId","originTracingNodeId","destinationTracingNodeId","traceType","attachments"],"additionalProperties":false}}},"required":["id","name","description","companyId","isGlobal","isArchived","isActive","isPreference","tracingType","createdAt","updatedAt","rules","orders"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/attachment-templates/{id}":{"get":{"tags":["Attachment Templates"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"isGlobal":{"type":"boolean"},"isArchived":{"type":"boolean"},"isActive":{"type":"boolean"},"isPreference":{"type":"boolean"},"tracingType":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","description","companyId","isGlobal","isArchived","isActive","isPreference","tracingType","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"patch":{"tags":["Attachment Templates"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"nullable":true,"type":"string"},"tracingType":{"type":"string","minLength":1},"isActive":{"default":true,"type":"boolean"},"rules":{"default":[],"type":"array","items":{"type":"object","properties":{"isBackupRule":{"default":false,"type":"boolean"},"idx":{"type":"integer","minimum":0,"maximum":9007199254740991},"facilityProcessIds":{"default":[],"type":"array","items":{"type":"string"}},"documents":{"default":[],"type":"array","items":{"type":"object","properties":{"documentType":{"type":"string","minLength":1},"isMandatory":{"type":"boolean"},"isAppliedToAllCountries":{"type":"boolean"},"idx":{"type":"integer","minimum":0,"maximum":9007199254740991},"countryCodes":{"default":[],"type":"array","items":{"type":"string"}}},"required":["documentType","isMandatory","isAppliedToAllCountries","idx"]}}},"required":["idx"]}}},"required":["name","tracingType"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/attachment-templates/{id}/details":{"get":{"tags":["Attachment Templates"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"isGlobal":{"type":"boolean"},"isArchived":{"type":"boolean"},"isActive":{"type":"boolean"},"isPreference":{"type":"boolean"},"tracingType":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"idx":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"isBackupRule":{"type":"boolean"},"facilityProcesses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"}},"required":["id","name"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"documentType":{"type":"string"},"documentClass":{"type":"string","enum":["TRANSACTIONAL","COMPANY","PRODUCT"]},"title":{"nullable":true,"type":"string"},"isMandatory":{"type":"boolean"},"isAppliedToAllCountries":{"type":"boolean"},"idx":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"countryCodes":{"type":"array","items":{"type":"string"}}},"required":["id","documentType","documentClass","title","isMandatory","isAppliedToAllCountries","idx","countryCodes"],"additionalProperties":false}}},"required":["id","idx","isBackupRule","facilityProcesses","documents"],"additionalProperties":false}},"backupRule":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"idx":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"isBackupRule":{"type":"boolean"},"facilityProcesses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"}},"required":["id","name"],"additionalProperties":false}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"documentType":{"type":"string"},"documentClass":{"type":"string","enum":["TRANSACTIONAL","COMPANY","PRODUCT"]},"title":{"nullable":true,"type":"string"},"isMandatory":{"type":"boolean"},"isAppliedToAllCountries":{"type":"boolean"},"idx":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"countryCodes":{"type":"array","items":{"type":"string"}}},"required":["id","documentType","documentClass","title","isMandatory","isAppliedToAllCountries","idx","countryCodes"],"additionalProperties":false}}},"required":["id","idx","isBackupRule","facilityProcesses","documents"],"additionalProperties":false},"hasOrders":{"type":"boolean"}},"required":["id","name","description","companyId","isGlobal","isArchived","isActive","isPreference","tracingType","createdAt","updatedAt","rules","backupRule","hasOrders"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/attachment-templates/{id}/documents":{"get":{"tags":["Attachment Templates"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"countryCode","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"facilityProcess","required":false},{"schema":{"anyOf":[{"type":"string"},{"type":"boolean"}]},"in":"query","name":"isOrigin","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"supplierId","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"salesOrderId","required":false},{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"isGlobal":{"type":"boolean"},"isArchived":{"type":"boolean"},"isActive":{"type":"boolean"},"isPreference":{"type":"boolean"},"tracingType":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"rules":{"type":"array","items":{"type":"object","properties":{"facilityProcessId":{"type":"string"},"documentType":{"type":"string"},"title":{"nullable":true,"type":"string"},"documentClass":{"nullable":true,"type":"string","enum":["TRANSACTIONAL","COMPANY","PRODUCT"]},"isAppliedToAllCountries":{"type":"boolean"},"isMandatory":{"type":"boolean"},"countryCodes":{"type":"array","items":{"type":"string"}},"syncedDocument":{"nullable":true,"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fileId":{"type":"string"},"name":{"type":"string"}},"required":["id","fileId","name"],"additionalProperties":false}},"otherVersionsAvailable":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["documents","otherVersionsAvailable"],"additionalProperties":false}},"required":["facilityProcessId","documentType","title","documentClass","isAppliedToAllCountries","isMandatory","countryCodes"],"additionalProperties":false}}},"required":["id","name","description","companyId","isGlobal","isArchived","isActive","isPreference","tracingType","createdAt","updatedAt","rules"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/attachment-templates/{id}/archive":{"post":{"tags":["Attachment Templates"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/attachment-templates/preference":{"put":{"tags":["Attachment Templates"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attachmentTemplateId":{"nullable":true,"type":"string"}},"required":["attachmentTemplateId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"attachmentTemplateId":{"nullable":true,"type":"string"}},"required":["attachmentTemplateId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/company-documents/download":{"post":{"tags":["Company Documents"],"description":"Download company documents as a ZIP file","requestBody":{"required":true,"content":{"application/json":{"schema":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"url":{"type":"string","minLength":1},"id":{"type":"string","minLength":1}},"required":["url","id"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/company-documents/process/":{"post":{"tags":["Company Documents"],"description":"Process a company document by triggering extraction and type classification","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileId":{"type":"string","minLength":1}},"required":["fileId"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"fileId":{"type":"string"},"status":{"type":"string"},"percentage":{"type":"number"},"workflows":{"type":"array","items":{"type":"string"}},"finishedWorkflows":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","fileId","status","percentage","workflows","finishedWorkflows","metadata","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/company-documents/process/{id}":{"get":{"tags":["Company Documents"],"description":"Get company document processing status by workflow ID","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"fileId":{"type":"string"},"status":{"type":"string"},"percentage":{"type":"number"},"workflows":{"type":"array","items":{"type":"string"}},"finishedWorkflows":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","fileId","status","percentage","workflows","finishedWorkflows","metadata","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/company-documents/process/cancel":{"delete":{"tags":["Company Documents"],"description":"Cancel company document workflow by workflow ID","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowId":{"type":"string","minLength":1}},"required":["workflowId"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/company-documents/shared":{"get":{"tags":["Company Documents"],"description":"List documents shared between the authenticated company and a target company","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"companyId","required":true},{"schema":{"type":"string"},"in":"query","name":"documentType","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"nullable":true,"type":"string"},"ownerCompanyId":{"nullable":true,"type":"string"},"name":{"type":"string"},"documentTypeId":{"nullable":true,"type":"string"},"fileId":{"nullable":true,"type":"string"},"fileUrl":{"nullable":true,"type":"string"},"originalFileUrl":{"nullable":true,"type":"string"},"fileType":{"nullable":true,"type":"string"},"fileContentType":{"nullable":true,"type":"string"},"isPublic":{"nullable":true,"anyOf":[{"type":"boolean"},{"type":"number"}]},"type":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","companyId","ownerCompanyId","name","documentTypeId","fileId","fileUrl","originalFileUrl","fileType","fileContentType","isPublic","type","createdAt","updatedAt"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/document-types/":{"get":{"tags":["Document Types"],"parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string"},"in":"query","name":"name","required":false},{"schema":{"default":"ALL","type":"string","enum":["TRANSACTIONAL","COMPANY","ALL"]},"in":"query","name":"documentClass","required":false},{"schema":{"default":"title:ASC","type":"string"},"in":"query","name":"sort","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"documentClass":{"type":"string","enum":["TRANSACTIONAL","COMPANY","PRODUCT"]},"isDeprecated":{"type":"boolean"},"impactAreaId":{"nullable":true,"type":"string"}},"required":["id","title","documentClass","isDeprecated","impactAreaId"],"additionalProperties":false}}},"required":["meta","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/company-certifications/download":{"post":{"tags":["Company Certifications"],"description":"Download certifications as a ZIP file","requestBody":{"required":true,"content":{"application/json":{"schema":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"url":{"type":"string","minLength":1},"id":{"type":"string","minLength":1}},"required":["url","id"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/companies/bulk-unlink":{"patch":{"tags":["CompanyProfilesUnlink"],"description":"Unlinks multiple companies from the caller, bidirectionally. Each id is processed independently — a failure for one id does not stop the rest.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"forCompanyIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["forCompanyIds"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/companies":{"post":{"tags":["Companies"],"description":"Create a new company","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"officialName":{"type":"string","minLength":1,"maxLength":255},"name":{"type":"string","minLength":1,"maxLength":255},"country":{"type":"string","minLength":1},"companySize":{"type":"string","enum":["FROM_0_TO_1","FROM_2_TO_10","FROM_11_TO_50","FROM_51_TO_200","FROM_201_TO_500","FROM_501_TO_1000","FROM_1001_TO_5000","FROM_5001_TO_10000","FROM_10001_TO_INFINITE"]},"companyType":{"type":"string","enum":["EDUCATIONAL_INSTITUTION","GOVERNMENT_AGENCY","NONPROFIT","PARTNERSHIP","PRIVATELY_HELD","FAMILY_BUSINESS","PUBLIC_COMPANY","SELF_EMPLOYED","SOLE_PROPRIETORSHIP"]},"facilityProcesses":{"type":"string","minLength":1},"connectionType":{"type":"string","enum":["SUPPLIER","CLIENT"]},"onBehalfOfCompanyId":{"type":"string","minLength":1,"maxLength":255},"addressLine1":{"type":"string"},"city":{"type":"string"},"geojson":{}},"required":["officialName","country","facilityProcesses","connectionType"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"type":"number"},"isRemoved":{"nullable":true,"type":"number"},"isClientCompany":{"nullable":true,"type":"number"},"oryOrganizationId":{"nullable":true,"type":"string"}},"required":["id","createdAt","createdByUserId","createdByUserName","createdByImpersonateId","createdByCompanyId","updatedAt","updatedByUserId","updatedByUserName","updatedByImpersonateId","updatedByImpersonateName","updatedByCompanyId","updatedByCompanyName","createdByApiKeyId","createdByApiKeyLabel","updatedByApiKeyId","updatedByApiKeyLabel","isDemoCompany","isRemoved","isClientCompany","oryOrganizationId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"get":{"tags":["Companies"],"description":"Lists companies in the caller's network. Supports pagination, sorting, filtering, an unpaginated dropdown mode (`isDropDown`/`hasGeojson`), and a trigram-similarity duplicate-company search (`findSimilar`).","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":15,"type":"integer","minimum":0,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","pattern":"^[a-zA-Z]+:(ASC|DESC|asc|desc)$"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"hasFeature","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"in":"query","name":"hasRelationshipType","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"in":"query","name":"isSupplierNetwork","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"companyIds","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"excludeCompanyIds","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"in":"query","name":"includeOwnCompany","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"in":"query","name":"findSimilar","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"name","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"in":"query","name":"isDropDown","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"in":"query","name":"hasGeojson","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"officialName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"internalCompanyCode":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}}}},"required":["meta","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/companies/{id}/created-network-products":{"get":{"tags":["Companies"],"description":"Products created by the caller's company for a network-linked brand company (`:id`). `isDropDown=true` returns the full unpaginated list (used by CSV-import validation and client-filtered dropdowns); otherwise returns a paginated, category/property-enriched list.","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":15,"type":"integer","minimum":0,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","pattern":"^[a-zA-Z]+:(ASC|DESC|asc|desc)$"},"in":"query","name":"sort","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"in":"query","name":"hasProductCategoryId","required":false},{"schema":{"type":"string","maxLength":255},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"in":"query","name":"isDropDown","required":false},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"code":{"nullable":true,"type":"string"},"brandId":{"nullable":true,"type":"string"},"brandName":{"type":"string"},"materials":{"type":"array","items":{}}},"required":["id","brandName","materials"],"additionalProperties":{}}}},"required":["meta","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/companies/{forCompanyId}/data-points-answers":{"get":{"summary":"Lists data point definitions merged with any existing answers","tags":["Companies/Data Point Answers"],"parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":15,"type":"integer","minimum":0,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","pattern":"^name:(ASC|DESC)$"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"onBehalfOfCompanyId","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"sectionId","required":false},{"schema":{"type":"string","minLength":1},"in":"path","name":"forCompanyId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"retracedId":{"type":"string"},"name":{"type":"string"},"templateId":{"type":"string"}},"required":["retracedId","name"],"additionalProperties":{}}}},"required":["meta","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/companies/directory-search":{"get":{"tags":["Companies"],"description":"Read-only company search reachable by a user with no company membership (e.g. the onboarding landing page). Returns only public profile fields.","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":50},"in":"query","name":"count","required":false},{"schema":{"type":"string","minLength":3,"maxLength":255},"in":"query","name":"searchQuery","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"displayName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"founded":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"imageList":{"type":"array","items":{}},"facilityProcesses":{"nullable":true,"type":"string"}},"required":["companyId","officialName","name","displayName","country","countryName","city","website","companySize","companyType","founded","description","featuredImageFileUrl","imageList","facilityProcesses"],"additionalProperties":false}}},"required":["meta","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/companies/export":{"post":{"tags":["Companies"],"description":"Export companies from network","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"default":[],"maxItems":500,"type":"array","items":{"type":"string","minLength":1}},"columnKeys":{"nullable":true,"type":"array","items":{"type":"string"}}}}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/companies/link":{"post":{"tags":["Companies"],"description":"Links two companies, bidirectionally, as supplier/client","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"forCompanyId":{"type":"string","minLength":1,"maxLength":4000},"connectionType":{"type":"string","enum":["SUPPLIER","CLIENT"]}},"required":["forCompanyId","connectionType"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"connectionType":{"type":"string","enum":["SUPPLIER","CLIENT"]}},"required":["id","connectionType"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/companies/network-countries":{"get":{"tags":["Companies"],"description":"Distinct, sorted country codes across the caller's network (companies linked via company-to-company connections). Used to populate country filter dropdowns on company-selection tables.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/companies/unlink":{"post":{"tags":["CompanyProfilesUnlink"],"description":"Unlinks two companies, bidirectionally","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"forCompanyId":{"type":"string","minLength":1,"maxLength":4000}},"required":["forCompanyId"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/companies/vector-search":{"get":{"tags":["Companies"],"parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":15,"type":"integer","minimum":1,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","minLength":1,"maxLength":255},"in":"query","name":"searchQuery","required":true},{"schema":{"nullable":true,"type":"string","minLength":1},"in":"query","name":"excludeCompanyIds","required":false},{"schema":{"nullable":true,"type":"string","minLength":1,"maxLength":255},"in":"query","name":"country","required":false},{"schema":{"nullable":true,"type":"string","minLength":1,"maxLength":255},"in":"query","name":"facilityProcess","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"byCompanyId":{"type":"string"},"companyId":{"type":"string"},"vectorDistance":{"type":"number"},"vectorSimilarity":{"type":"number"},"stringSimilarity":{"type":"number"},"matchScore":{"type":"number"},"countryMatch":{"type":"boolean"},"facilityProcessMatch":{"type":"boolean"},"officialName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"displayName":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"countryName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"connectionTypeId":{"nullable":true,"type":"string"},"imageList":{"type":"array","items":{}},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"supplyChainTier":{"type":"array","items":{}},"relationshipType":{"type":"array","items":{}},"responsiblePerson":{"type":"array","items":{}}},"required":["id","key","byCompanyId","companyId","vectorDistance","vectorSimilarity","stringSimilarity","matchScore","countryMatch","facilityProcessMatch","officialName","name","displayName","country","countryName","facilityProcesses","connectionTypeId","imageList","featuredImageFileUrl","originalFeaturedImageFileUrl","originalVideoFileUrl","supplyChainTier","relationshipType","responsiblePerson"],"additionalProperties":{}}}},"required":["meta","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/companies/impact-areas/hierarchy/{sectionId}":{"get":{"summary":"Gets impact areas by section id with hierarchy","tags":["Companies/Impact Areas"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"sectionId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"sectionId":{"type":"string","minLength":1},"parentId":{"nullable":true,"type":"string"},"isParent":{"nullable":true,"type":"number"},"level":{"nullable":true,"type":"number"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","sectionId","parentId","isParent","level","createdAt","updatedAt"],"additionalProperties":false}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/companies/join-requests/{id}/approve":{"post":{"tags":["Companies"],"description":"Approves a pending join request, adding the requester to the caller's company with the chosen role. COMPANY_OWNER only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["EMPLOYEE","COMPANY_OWNER"]}},"required":["role"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/companies/join-requests":{"post":{"tags":["Companies"],"description":"Lets a companyless authenticated user request to join a company. Notifies every COMPANY_OWNER of that company.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","minLength":1}},"required":["companyId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"userId":{"type":"string"},"status":{"type":"string"}},"required":["id","companyId","userId","status"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/companies/join-requests/pending":{"get":{"tags":["Companies"],"description":"Lists pending join requests for the caller's company. COMPANY_OWNER only.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"userId":{"type":"string"},"status":{"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"userEmail":{"type":"string"},"userFirstName":{"nullable":true,"type":"string"},"userLastName":{"nullable":true,"type":"string"}},"required":["id","companyId","userId","status","decidedByUserId","decidedAt","createdAt","updatedAt","userEmail","userFirstName","userLastName"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/companies/join-requests/{id}/reject":{"post":{"tags":["Companies"],"description":"Rejects a pending join request. Does not add the requester to the company. COMPANY_OWNER only.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/companies/templates/{templateId}/profiles":{"get":{"tags":["Companies/Templates"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"forCompanyIds","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"templateId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"forCompanyId":{"type":"string"},"byCompanyId":{"type":"string"},"onBehalfOfCompanyId":{"type":"string"},"profileType":{"type":"string"},"data":{"type":"object","additionalProperties":{}}},"required":["forCompanyId","byCompanyId","onBehalfOfCompanyId","profileType","data"],"additionalProperties":{}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/companies/templates/":{"get":{"tags":["Companies/Templates"],"parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":15,"type":"integer","minimum":1,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string"},"in":"query","name":"sort","required":false},{"schema":{"type":"string"},"in":"query","name":"name","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"composedOf":{"type":"array","items":{"type":"string"}},"setup":{"type":"array","items":{}},"type":{"type":"string"},"createdAt":{"nullable":true,"type":"string","format":"date-time"},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"}},"required":["id","name","composedOf","setup","type","createdAt","createdByUserId","createdByUserName","createdByImpersonateId","createdByCompanyId","updatedAt","updatedByUserId","updatedByUserName","updatedByImpersonateId","updatedByImpersonateName","updatedByCompanyId","updatedByCompanyName","createdByApiKeyId","createdByApiKeyLabel","updatedByApiKeyId","updatedByApiKeyLabel"],"additionalProperties":false}}},"required":["meta","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/companies/templates/{templateId}/profile/{forCompanyId}":{"get":{"tags":["Companies/Templates"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"templateId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"forCompanyId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"forCompanyId":{"type":"string"},"byCompanyId":{"type":"string"},"onBehalfOfCompanyId":{"type":"string"},"profileType":{"type":"string"},"data":{"type":"object","additionalProperties":{}},"isConnected":{"type":"boolean"},"isReverseConnected":{"type":"boolean"},"templateCompletionPercentage":{"type":"number"}},"required":["forCompanyId","byCompanyId","onBehalfOfCompanyId","profileType","data"],"additionalProperties":{}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/companies/templates/{templateId}/answer":{"patch":{"tags":["Companies/Templates"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"source":{"type":"object","properties":{},"additionalProperties":{}}}},"onBehalfOfCompanyId":{"type":"string","minLength":1,"maxLength":64},"forCompanyId":{"type":"string","minLength":1,"maxLength":64},"answer":{"type":"object","additionalProperties":{"type":"object","properties":{"value":{},"verificationMeta":{"type":"object","properties":{"id":{"type":"string"},"objectId":{"type":"string"},"version":{"type":"string"},"issueDate":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","objectId","version","issueDate"]},"timestamp":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["value"],"additionalProperties":{}}}},"required":["onBehalfOfCompanyId","forCompanyId","answer"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"templateId","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/questionnaires/":{"get":{"summary":"List questionnaires for the current company","tags":["Questionnaire"],"description":"Paginated, filterable, sortable list of the calling company's questionnaires. Serves the template list instead when `isTemplate` or `myTemplates` is set, or when the caller is a Retraced admin.","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":15,"type":"integer","minimum":0,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","pattern":"^[a-zA-Z]+:(ASC|DESC|asc|desc)(,[a-zA-Z]+:(ASC|DESC|asc|desc))*$"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"in":"query","name":"isTemplate","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"in":"query","name":"isArchived","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"in":"query","name":"myTemplates","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["ACTIVE","COMPLETED","DRAFT"]},"isRetraced":{"type":"string","enum":["YES","NO"]},"isTemplate":{"type":"number"},"templateId":{"nullable":true,"type":"string"},"questionCount":{"nullable":true,"type":"number"},"invitedCompanies":{"nullable":true,"type":"number"},"timesUsedAsTemplate":{"nullable":true,"type":"number"},"createdAt":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"firstRequestDate":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"statistics":{"nullable":true,"type":"object","properties":{"totalApprovedResponses":{"nullable":true,"type":"number"},"totalInReviewResponses":{"nullable":true,"type":"number"},"totalDeniedResponses":{"nullable":true,"type":"number"},"totalMissingResponses":{"nullable":true,"type":"number"},"totalQuestions":{"nullable":true,"type":"number"},"approvedResponsesPercentage":{"nullable":true,"type":"number"},"inReviewResponsesPercentage":{"nullable":true,"type":"number"},"deniedResponsesPercentage":{"nullable":true,"type":"number"},"missingResponsesPercentage":{"nullable":true,"type":"number"},"totalOpenRequests":{"nullable":true,"type":"number"},"totalInReviewRequests":{"nullable":true,"type":"number"},"totalCompletedRequests":{"nullable":true,"type":"number"},"totalCompaniesInvited":{"nullable":true,"type":"number"},"totalRequestChanges":{"nullable":true,"type":"number"}},"additionalProperties":false}},"required":["id","companyId","name","status","isRetraced","isTemplate"],"additionalProperties":{}}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"post":{"summary":"Create a questionnaire","tags":["Questionnaire"],"description":"Creates a questionnaire for the calling company. With `templateId` set, the source questionnaire's sections and questions are copied onto the new one; the source must be owned by the caller's company or be an active Retraced template.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"status":{"type":"string","enum":["ACTIVE","COMPLETED","DRAFT"]},"description":{"type":"string","minLength":1,"maxLength":500},"dueDate":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"templateId":{"anyOf":[{"type":"string","minLength":1},{"type":"string","nullable":true,"enum":[null]}]}},"required":["name","status"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"isRetraced":{"nullable":true,"type":"string"},"isTemplate":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isActive":{"nullable":true,"type":"number"},"templateId":{"nullable":true,"type":"string"},"statistics":{"nullable":true,"type":"object","properties":{},"additionalProperties":{}}},"required":["id"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete draft questionnaires","tags":["Questionnaire"],"description":"Permanently deletes the given questionnaires. All-or-nothing: every id must belong to the calling company, must not be a template, and must still be a draft — otherwise nothing is deleted. Questionnaires that have been sent out cannot be deleted.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"questionnaireIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["questionnaireIds"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/{id}":{"get":{"summary":"Get a questionnaire by id","tags":["Questionnaire"],"description":"Reads one questionnaire owned by the calling company. A Retraced admin reads across companies; for everyone else another company's questionnaire is indistinguishable from a missing one and answers 404. Archived questionnaires are returned.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"isRetraced":{"nullable":true,"type":"string"},"isTemplate":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isActive":{"nullable":true,"type":"number"},"templateId":{"nullable":true,"type":"string"},"statistics":{"nullable":true,"type":"object","properties":{},"additionalProperties":{}},"questions":{"type":"array","items":{}},"sections":{"type":"array","items":{}}},"required":["id","questions","sections"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a questionnaire","tags":["Questionnaire"],"description":"Updates name, description, due date and/or status. Omitted fields keep their stored value; an explicit null clears `description` or `dueDate`. A questionnaire owned by Retraced can only be updated by a Retraced admin.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"string","nullable":true,"enum":[null]}]},"dueDate":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"string","nullable":true,"enum":[null]}]},"status":{"type":"string","enum":["ACTIVE","COMPLETED","DRAFT"]}}}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"isRetraced":{"nullable":true,"type":"string"},"isTemplate":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isActive":{"nullable":true,"type":"number"},"templateId":{"nullable":true,"type":"string"},"statistics":{"nullable":true,"type":"object","properties":{},"additionalProperties":{}}},"required":["id"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/archive":{"post":{"summary":"Archive questionnaires","tags":["Questionnaire"],"description":"Moves the given questionnaires to the archived list. All-or-nothing: every id must belong to the calling company and must not be a template, otherwise nothing is archived. Archiving is idempotent — re-archiving an already-archived questionnaire succeeds and changes nothing. Any status can be archived. Each answer request attached to an archived questionnaire notifies its answering company.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"questionnaireIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["questionnaireIds"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/unarchive":{"post":{"summary":"Unarchive questionnaires","tags":["Questionnaire"],"description":"Restores the given questionnaires from the archived list. All-or-nothing: every id must belong to the calling company and must not be a template, otherwise nothing is unarchived. Unarchiving is idempotent — unarchiving an already-active questionnaire succeeds and changes nothing. Any status can be unarchived. Each answer request attached to an unarchived questionnaire notifies its answering company.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"questionnaireIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["questionnaireIds"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/{id}/export":{"post":{"summary":"Queue an export of a questionnaire’s answer requests","tags":["Questionnaire"],"description":"Queues an Excel export and answers immediately — the workbook is built asynchronously, so a 204 means \"accepted\", not \"ready\". With `allRequests` set, every answer request still on the questionnaire is exported and `requestIds` is ignored; otherwise `requestIds` must be non-empty. The questionnaire must have been created by the calling company. Request ids are not validated against the questionnaire.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"allRequests":{"type":"boolean"},"requestIds":{"type":"array","items":{"type":"string","minLength":1}}}}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/{id}/save-as-template":{"post":{"summary":"Clone a questionnaire into a new template","tags":["Questionnaire"],"description":"Copies a questionnaire, its sections and its questions into a brand-new draft template named \"Copy of …\". A Retraced admin may only clone Retraced-owned questionnaires; everyone else may only clone their own company's. The clone belongs to the source questionnaire's company, carries no answer requests or responses, and starts inactive when created by an admin.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"isRetraced":{"nullable":true,"type":"string"},"isTemplate":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isActive":{"nullable":true,"type":"number"},"templateId":{"nullable":true,"type":"string"},"statistics":{"nullable":true,"type":"object","properties":{},"additionalProperties":{}}},"required":["id"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/templates":{"post":{"summary":"Create a questionnaire template","tags":["Questionnaire"],"description":"Creates an empty draft template for the calling company. Unlike creating a questionnaire, nothing is cloned and the name is not checked for uniqueness — a company may hold several templates under one name. A Retraced admin's template is Retraced-owned and starts inactive, so it stays hidden until it is switched on.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","minLength":1,"maxLength":500}},"required":["name"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"isRetraced":{"nullable":true,"type":"string"},"isTemplate":{"nullable":true,"type":"number"},"isArchived":{"nullable":true,"type":"number"},"isActive":{"nullable":true,"type":"number"},"templateId":{"nullable":true,"type":"string"},"statistics":{"nullable":true,"type":"object","properties":{},"additionalProperties":{}}},"required":["id"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete questionnaire templates","tags":["Questionnaire"],"description":"Permanently deletes the given questionnaire templates. All-or-nothing: every id must belong to the calling company and be a template, and none may be Retraced-owned unless the caller is a Retraced admin — otherwise nothing is deleted.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"templateIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["templateIds"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/{id}/requests":{"get":{"summary":"List a questionnaire's answer requests","tags":["Questionnaire request"],"description":"Paginated, filterable, sortable list of the answer requests on one questionnaire — one row per invited company, carrying that request's status and answer statistics alongside profile data for the supplier and answering companies. The questionnaire must belong to the calling company; Retraced admins may read any. `facilityProcesses` comes back as a comma-separated string of ids, not an array.","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":15,"type":"integer","minimum":0,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","pattern":"^[a-zA-Z]+:(ASC|DESC|asc|desc)(,[a-zA-Z]+:(ASC|DESC|asc|desc))*$"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":2048},"in":"query","name":"filter","required":false},{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"questionnaireId":{"type":"string"},"forCompanyId":{"type":"string"},"onBehalfOfCompanyId":{"type":"string"},"status":{"type":"string","enum":["OPEN","IN_REVIEW","COMPLETED","REQUEST_CHANGES","DELETED"]},"supplierName":{"nullable":true,"type":"string"},"answeredByName":{"nullable":true,"type":"string"},"supplierConnected":{"nullable":true,"type":"boolean"},"answeredByConnected":{"nullable":true,"type":"boolean"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"facilityProcesses":{"nullable":true,"type":"string"},"collaborationStatus":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"internalCompanyCode":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"dueDate":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"lastReminded":{"nullable":true,"type":"string"},"supplyChainTier":{"default":null,"nullable":true,"type":"array","items":{"type":"string"}},"relationshipType":{"default":null,"nullable":true,"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":{}}},{"type":"object","properties":{},"additionalProperties":{}}]},"agents":{"default":null,"nullable":true,"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":{}}},{"type":"string"}]},"vendors":{"default":null,"nullable":true,"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":{}}},{"type":"string"}]},"statistics":{"nullable":true,"type":"object","properties":{"totalApprovedResponses":{"type":"number"},"totalInReviewResponses":{"type":"number"},"totalDeniedResponses":{"type":"number"},"totalMissingResponses":{"type":"number"},"totalResponses":{"type":"number"},"totalQuestions":{"type":"number"},"totalComments":{"type":"number"},"approvedResponsesPercentage":{"type":"number","minimum":0,"maximum":100},"inReviewResponsesPercentage":{"type":"number","minimum":0,"maximum":100},"deniedResponsesPercentage":{"type":"number","minimum":0,"maximum":100},"missingResponsesPercentage":{"type":"number","minimum":0,"maximum":100},"responsesPercentage":{"type":"number","minimum":0,"maximum":100}},"additionalProperties":false}},"required":["id","questionnaireId","forCompanyId","onBehalfOfCompanyId","status"],"additionalProperties":{}}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"post":{"summary":"Invite companies to answer a questionnaire","tags":["Questionnaire request"],"description":"Creates one answer request per company on the given questionnaire, which must belong to the calling company and must not be a template. All-or-nothing: every company must be one the caller holds a profile for and must not already have a live request for this questionnaire on behalf of the same company, otherwise nothing is created. The first invite publishes a DRAFT questionnaire — it moves to ACTIVE. Each request inherits the questionnaire's due date, and the answering company is notified.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requests":{"minItems":1,"type":"array","items":{"type":"object","properties":{"forCompanyId":{"type":"string","minLength":1},"onBehalfOfCompanyId":{"type":"string","minLength":1}},"required":["forCompanyId","onBehalfOfCompanyId"]}}},"required":["requests"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove companies from a questionnaire","tags":["Questionnaire request"],"description":"Removes the given answer requests from the questionnaire, which must belong to the calling company. All-or-nothing: every request must belong to this questionnaire and must have been created by the calling company, otherwise nothing is removed. The companies' submitted answers are deleted permanently; the requests themselves are flagged as removed and stop counting towards the questionnaire's progress. Removing an already-removed request succeeds without further effect.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["requestIds"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/requests":{"get":{"summary":"List a company's answer requests","tags":["Questionnaire request"],"description":"Paginated, filterable, sortable list of answer requests scoped to the calling company. Without `companyId` it returns the requests the caller received — their questionnaire inbox. With `companyId` it returns the requests the caller sent to that one company, limited to questionnaires the caller owns. Archived questionnaires and deleted requests are excluded from both. A request is only listed when the caller holds an `ABOUT` profile for both the requesting company and the company the request is about.","parameters":[{"schema":{"type":"string","maxLength":512},"in":"query","name":"companyId","required":false},{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":15,"type":"integer","minimum":0,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","pattern":"^(name|requestedBy|updatedAt|createdAt|about|status|lastReminded|dueDate|progress):(ASC|DESC)(,(name|requestedBy|updatedAt|createdAt|about|status|lastReminded|dueDate|progress):(ASC|DESC))*$"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"questionnaireId":{"type":"string"},"name":{"type":"string"},"forCompanyId":{"type":"string"},"onBehalfOfCompanyId":{"type":"string"},"requestedBy":{"nullable":true,"type":"string"},"about":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["OPEN","IN_REVIEW","COMPLETED","REQUEST_CHANGES","DELETED"]},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"supplierConnected":{"nullable":true,"type":"boolean"},"answeredByConnected":{"nullable":true,"type":"boolean"},"dueDate":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"lastReminded":{"nullable":true,"type":"string"},"statistics":{"nullable":true,"type":"object","properties":{"totalApprovedResponses":{"type":"number"},"totalInReviewResponses":{"type":"number"},"totalDeniedResponses":{"type":"number"},"totalMissingResponses":{"type":"number"},"totalResponses":{"type":"number"},"totalQuestions":{"type":"number"},"totalComments":{"type":"number"},"approvedResponsesPercentage":{"type":"number","minimum":0,"maximum":100},"inReviewResponsesPercentage":{"type":"number","minimum":0,"maximum":100},"deniedResponsesPercentage":{"type":"number","minimum":0,"maximum":100},"missingResponsesPercentage":{"type":"number","minimum":0,"maximum":100},"responsesPercentage":{"type":"number","minimum":0,"maximum":100}},"additionalProperties":false}},"required":["id","questionnaireId","name","forCompanyId","onBehalfOfCompanyId","status"],"additionalProperties":{}}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/requests/{requestId}":{"get":{"summary":"Get one answer request with its questions and saved answers","tags":["Questionnaire request"],"description":"The read behind the responder's answer page and the reviewer's per-company panel: one answer request merged with the questionnaire it answers, plus every question and the responder's saved answer. Note which half of the merge wins — `id`, `status` and `dueDate` are the **questionnaire's**, while the request's own are `questionnaireRequestId` and `requestStatus`. Attachments referenced by a question or an answer carry a 24-hour signed URL. Readable by the requesting company, the company being asked, and the company answering on its behalf; anyone else gets 404 rather than 403, so the endpoint never confirms a request they cannot read exists. An archived questionnaire answers 403.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"requestId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"isRetraced":{"nullable":true,"type":"string"},"isTemplate":{"nullable":true,"type":"number"},"updateByUserName":{"nullable":true,"type":"string"},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"isRetraced":{"nullable":true,"type":"string"},"sortOrder":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"sortOrder":{"nullable":true,"type":"number"},"questionTypeId":{"nullable":true,"type":"string"},"questionnaireSectionId":{"nullable":true,"type":"string"},"retracedDatapointId":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"sectionId":{"nullable":true,"type":"string"},"isCustom":{"type":"boolean"},"meta":{"type":"object","properties":{},"additionalProperties":{}},"answer":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"isNotAvailable":{"nullable":true,"type":"number"},"isVerified":{"nullable":true,"type":"boolean"},"verificationMeta":{},"autoAnswered":{"nullable":true,"type":"number"},"responseId":{"nullable":true,"type":"string"},"requestId":{"nullable":true,"type":"string"},"questionId":{"nullable":true,"type":"string"},"retracedTemplateId":{"nullable":true,"type":"string"},"commentCount":{"nullable":true,"type":"number"}},"required":["id","isCustom","meta"],"additionalProperties":{}}},"questionnaireId":{"type":"string"},"questionnaireRequestId":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"onBehalfOfCompanyId":{"nullable":true,"type":"string"},"requestStatus":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"statistics":{"nullable":true,"type":"object","properties":{"totalApprovedResponses":{"nullable":true,"type":"number"},"totalInReviewResponses":{"nullable":true,"type":"number"},"totalDeniedResponses":{"nullable":true,"type":"number"},"totalMissingResponses":{"nullable":true,"type":"number"},"totalResponses":{"nullable":true,"type":"number"},"totalQuestions":{"nullable":true,"type":"number"},"totalComments":{"nullable":true,"type":"number"},"approvedResponsesPercentage":{"nullable":true,"type":"number"},"inReviewResponsesPercentage":{"nullable":true,"type":"number"},"deniedResponsesPercentage":{"nullable":true,"type":"number"},"missingResponsesPercentage":{"nullable":true,"type":"number"},"responsesPercentage":{"nullable":true,"type":"number"}},"additionalProperties":false},"isRemoved":{"nullable":true,"type":"number"},"requestCompany":{"type":"object","properties":{"id":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"}},"additionalProperties":false},"onBehalfOfCompany":{"type":"object","properties":{"id":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"}},"additionalProperties":false},"requestedCompany":{"type":"object","properties":{"id":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"}},"additionalProperties":false},"supplierConnected":{"type":"boolean"},"answeredByConnected":{"type":"boolean"}},"required":["id","sections","questions","questionnaireId","questionnaireRequestId","requestCompany","onBehalfOfCompany","requestedCompany","supplierConnected","answeredByConnected"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/requests/{requestId}/documents":{"post":{"summary":"Create documents on the company an answer request is about","tags":["Questionnaire Responses"],"description":"Uploads documents as the answer to a DOCUMENTS question, filed on the company the request is *about*. The target company is taken from the request's `onBehalfOfCompanyId` and is deliberately **not** accepted in the body, so this grant cannot be aimed at any other company. Only the answering company (`forCompanyId`) may call it, and only while the brand that issued the request is still connected to it; anyone else gets 404 `request_not_found`, so the existence of another company's request is never confirmed. Where the generic `POST /v3/company-documents/bulk-create` requires the target to be in the caller's own network — which a delegated answering party never is — this route treats the request itself as the authorization. Each document is filed on the subject company with the caller as its owner, is never public, and is auto-shared with the brand that asked, which is what makes it visible to all three parties. Files must belong to the caller; any that do not are skipped rather than failing the batch. Responds 201 with the created ids.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"minItems":1,"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string","minLength":1,"maxLength":36},"name":{"nullable":true,"type":"string","minLength":1,"maxLength":255},"documentTypeId":{"nullable":true,"type":"string","minLength":1,"maxLength":255}},"required":["fileId"]}}},"required":["documents"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"requestId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"documentTypeId":{"nullable":true,"type":"string"},"fileId":{"nullable":true,"type":"string"}},"required":["id","name","documentTypeId","fileId"],"additionalProperties":false}}},"required":["documents"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/requests/{requestId}/certificates":{"post":{"summary":"Create a certificate on the company an answer request is about","tags":["Questionnaire Responses"],"description":"Creates a certificate as the answer to a CERTIFICATE question, on the company the request is *about*. The target company comes from the request's `onBehalfOfCompanyId` and is deliberately **not** accepted in the body. Only the answering company may call it, and only while the brand that issued the request is still connected to it; anyone else gets 404 `request_not_found`. Replaces `POST /v3/claims` for this flow, which inserted the claim and copied its file into private storage and *then* read the row back through a network-scoped query — so a delegated answering party got a 404 after the write, leaving a claim no read path can see, and a duplicate check scoped to the caller that could not find it, so every retry wrote another. Here the read-back is unscoped and the duplicate check is scoped to the company the certificate is actually filed on. The certificate is created in REQUESTED state; `status` is not client-settable. Required and optional fields mirror `POST /api/claims`, so only the standard and the two dates are required; a file is optional and, when given, must belong to the caller. Responds 201.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"standardId":{"type":"string","minLength":1,"maxLength":255},"issueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$"},"expirationDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$"},"fileId":{"nullable":true,"type":"string","minLength":1,"maxLength":36},"issuedBy":{"nullable":true,"type":"string","maxLength":255},"documentNumber":{"nullable":true,"type":"string","minLength":1,"maxLength":255},"licenseNumber":{"nullable":true,"type":"string","minLength":1,"maxLength":255},"explanation":{"nullable":true,"type":"string"}},"required":["standardId","issueDate","expirationDate"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"requestId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"standardId":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"}},"required":["id","standardId","companyId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/requests/{requestId}/audits":{"post":{"summary":"Create an audit on the company an answer request is about","tags":["Questionnaire Responses"],"description":"Creates an audit as the answer to an AUDIT question, on the company the request is *about*. The target company comes from the request's `onBehalfOfCompanyId` and is not accepted in the body. Only the answering company may call it, and only while the brand that issued the request is still connected to it; anyone else gets 404 `request_not_found`. Unlike `POST /api/audits`, the audit is then shared with the subject company **and** with the brand without requiring the sharer to be linked to them — the request is the authorization — so the factory can finally see its own audit. Through the generic endpoint that share needed an answering-party-to-subject connection, which a delegated party never has, so it threw and was swallowed. `isPublic` is not accepted and is always false: a public audit fans a read grant out to every company linked to the uploader, which would expose the subject company's audit to the answering party's entire network. A failed share is reported, not logged and forgotten.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"auditTypeId":{"type":"string","minLength":1,"maxLength":255},"auditDate":{"nullable":true,"type":"string","minLength":1,"maxLength":64},"nextPlannedAuditDate":{"nullable":true,"type":"string","minLength":1,"maxLength":64},"auditedBy":{"nullable":true,"type":"string","minLength":1,"maxLength":255},"facilityScore":{"nullable":true,"type":"string","minLength":1,"maxLength":255},"referenceNumber":{"nullable":true,"type":"string","minLength":1,"maxLength":255},"auditReportFileId":{"nullable":true,"type":"string","minLength":1,"maxLength":36},"correctiveActionPlanFileId":{"nullable":true,"type":"string","minLength":1,"maxLength":36}},"required":["auditTypeId"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"requestId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"nullable":true,"type":"string"},"auditTypeId":{"nullable":true,"type":"string"}},"required":["id","companyId","auditTypeId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/requests/{requestId}/assets":{"get":{"summary":"List the assets of the company an answer request is about","tags":["Questionnaire Responses"],"description":"The documents, certificates or audits held by the company a questionnaire request is *about* — the picker behind every asset-link question. The company comes from the request's `onBehalfOfCompanyId`, never from the caller. Readable by **all three** parties to the request: the answering company selecting an asset, the brand reviewing the answer, and the subject company itself; anyone else gets 404 `request_not_found`. This exists because the generic pickers reach these rows through the caller's own network (certificates) or through per-asset sharing rows (audits), so a delegated answering party saw an empty list and could only ever create a new asset, never select one the company already holds — and a linked asset rendered blank when the page was reopened. Archived and soft-deleted assets are excluded.","parameters":[{"schema":{"type":"string","enum":["document","certificate","audit"]},"in":"query","name":"bucket","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"requestId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"assets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subTypeId":{"nullable":true,"type":"string"},"subTypeName":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"hasFile":{"type":"boolean"},"issuedAt":{"nullable":true},"expiresAt":{"nullable":true},"details":{"oneOf":[{"type":"object","properties":{"bucket":{"type":"string","enum":["document"]},"file":{"type":"object","properties":{"fileId":{"nullable":true,"type":"string"},"fileUrl":{"nullable":true,"type":"string"},"fileType":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileName":{"nullable":true,"type":"string"}},"required":["fileId","fileUrl","fileType","contentType","fileName"],"additionalProperties":false}},"required":["bucket","file"],"additionalProperties":false},{"type":"object","properties":{"bucket":{"type":"string","enum":["certificate"]},"standardType":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"issuedBy":{"nullable":true,"type":"string"},"documentNumber":{"nullable":true,"type":"string"},"licenseNumber":{"nullable":true,"type":"string"},"file":{"type":"object","properties":{"fileId":{"nullable":true,"type":"string"},"fileUrl":{"nullable":true,"type":"string"},"fileType":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileName":{"nullable":true,"type":"string"}},"required":["fileId","fileUrl","fileType","contentType","fileName"],"additionalProperties":false}},"required":["bucket","standardType","status","issuedBy","documentNumber","licenseNumber","file"],"additionalProperties":false},{"type":"object","properties":{"bucket":{"type":"string","enum":["audit"]},"referenceNumber":{"nullable":true,"type":"string"},"auditedBy":{"nullable":true,"type":"string"},"facilityScore":{"nullable":true,"type":"string"},"auditReportFile":{"type":"object","properties":{"fileId":{"nullable":true,"type":"string"},"fileUrl":{"nullable":true,"type":"string"},"fileType":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileName":{"nullable":true,"type":"string"}},"required":["fileId","fileUrl","fileType","contentType","fileName"],"additionalProperties":false},"correctiveActionPlanFile":{"type":"object","properties":{"fileId":{"nullable":true,"type":"string"},"fileUrl":{"nullable":true,"type":"string"},"fileType":{"nullable":true,"type":"string"},"contentType":{"nullable":true,"type":"string"},"fileName":{"nullable":true,"type":"string"}},"required":["fileId","fileUrl","fileType","contentType","fileName"],"additionalProperties":false}},"required":["bucket","referenceNumber","auditedBy","facilityScore","auditReportFile","correctiveActionPlanFile"],"additionalProperties":false}]}},"required":["id","subTypeId","subTypeName","name","hasFile","issuedAt","expiresAt","details"],"additionalProperties":false}}},"required":["assets"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/requests/{requestId}/assets/{assetId}/file":{"get":{"summary":"Sign the file of one asset linked to an answer request","tags":["Questionnaire Responses"],"description":"A time-limited download URL for the file behind one asset of the company a questionnaire request is about. Readable by all three parties to the request; anyone else gets 404 `request_not_found`. Takes an **asset id, never a file url**: the object key is resolved server-side from an asset that belongs to the request's subject company, so a valid `requestId` cannot be used to sign a file of some other company's asset. That is the whole difference from `GET /v3/files/:fileUrl`, which signs any private-bucket key it is handed. An asset the subject company does not hold answers 404 `asset_not_found`; a real asset carrying no file answers 404 `asset_has_no_file`, which is a different thing and says so. `part` picks between an audit's two files — its report (the default) and its corrective action plan — since the answer form previews both; the other buckets ignore it.","parameters":[{"schema":{"type":"string","enum":["document","certificate","audit"]},"in":"query","name":"bucket","required":true},{"schema":{"type":"string","enum":["report","correctiveActionPlan"]},"in":"query","name":"part","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"requestId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"assetId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"signedUrl":{"type":"string"}},"required":["signedUrl"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/{id}/requests/reminder":{"patch":{"summary":"Send a reminder for answer requests","tags":["Questionnaire request"],"description":"Notifies the answering companies that their answers are still outstanding, and records when they were last reminded. The questionnaire must belong to the calling company, and every id must be one of its answer requests — otherwise nothing is sent. An empty `requestIds` reminds every request on the questionnaire. Only requests that are still open or awaiting changes are notified; ids in any other state are accepted and skipped, so a batch containing only completed requests succeeds without sending anything. Each notified company receives an in-app notification and an email. Reminding a large questionnaire fans out one message per open request.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["requestIds"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/{id}/requests/due-date":{"patch":{"summary":"Set the due date on answer requests","tags":["Questionnaire request"],"description":"Moves the deadline on a batch of answer requests. The questionnaire must belong to the calling company, and every id must be one of its answer requests — otherwise nothing is changed. Requests that are already completed are accepted and skipped, so a batch containing only completed requests succeeds without changing anything. Each answering company whose request moved receives an in-app notification and an email. Re-dating a large questionnaire fans out one message per affected request.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"dueDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["requestIds","dueDate"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/{id}/requests/{requestId}/status":{"patch":{"summary":"Move an answer request to a new status","tags":["Questionnaire request"],"description":"Drives the whole review lifecycle of a single answer request: the answering company submits with IN_REVIEW, and the questionnaire's owner starts the review, asks for changes or marks it complete. Only the owner may set anything other than IN_REVIEW; anyone who is neither the owner nor the company being asked gets 404 rather than 403, so the endpoint never confirms a request they cannot see. Submitting for review is refused with 422 while a compulsory question is unanswered — a check that applies to the answering company, not the owner. IN_REVIEW also moves every answer that has not already been approved or denied into review, and COMPLETED approves whatever is still under review. The answering or requesting company is notified by email depending on the direction of the move, and the questionnaire's progress statistics are recomputed asynchronously.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["OPEN","IN_REVIEW","COMPLETED","REQUEST_CHANGES","DELETED"]}},"required":["status"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"requestId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"questionnaireId":{"type":"string"},"forCompanyId":{"nullable":true,"type":"string"},"onBehalfOfCompanyId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"statistics":{"nullable":true,"type":"object","properties":{"totalApprovedResponses":{"nullable":true,"type":"number"},"totalInReviewResponses":{"nullable":true,"type":"number"},"totalDeniedResponses":{"nullable":true,"type":"number"},"totalMissingResponses":{"nullable":true,"type":"number"},"totalResponses":{"nullable":true,"type":"number"},"totalQuestions":{"nullable":true,"type":"number"},"totalComments":{"nullable":true,"type":"number"},"approvedResponsesPercentage":{"nullable":true,"type":"number"},"inReviewResponsesPercentage":{"nullable":true,"type":"number"},"deniedResponsesPercentage":{"nullable":true,"type":"number"},"missingResponsesPercentage":{"nullable":true,"type":"number"},"responsesPercentage":{"nullable":true,"type":"number"}},"additionalProperties":false},"isRemoved":{"nullable":true,"type":"number"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"questionnaireName":{"nullable":true,"type":"string"},"supplierConnected":{"type":"boolean"},"answeredByConnected":{"type":"boolean"}},"required":["id","questionnaireId","supplierConnected","answeredByConnected"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/{id}/builder":{"get":{"summary":"Get a questionnaire with its sections and questions","tags":["Questionnaire"],"description":"The single read behind the questionnaire builder, preview and summary screens: one questionnaire plus its sections and questions, each ordered by sort order. Questions carry their `meta` blob both nested and flattened onto the question itself, and an attachment question additionally carries a 24-hour signed `attachmentFileUrl`. The questionnaire must belong to the calling company — another company's questionnaire is indistinguishable from a missing one and answers 404. Archived questionnaires are returned.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"isRetraced":{"nullable":true,"type":"string"},"isTemplate":{"nullable":true,"type":"boolean"},"isArchived":{"nullable":true,"type":"number"},"isActive":{"nullable":true,"type":"number"},"templateId":{"nullable":true,"type":"string"},"statistics":{"nullable":true,"type":"object","properties":{"totalApprovedResponses":{"nullable":true,"type":"number"},"totalInReviewResponses":{"nullable":true,"type":"number"},"totalDeniedResponses":{"nullable":true,"type":"number"},"totalMissingResponses":{"nullable":true,"type":"number"},"totalQuestions":{"nullable":true,"type":"number"},"approvedResponsesPercentage":{"nullable":true,"type":"number"},"inReviewResponsesPercentage":{"nullable":true,"type":"number"},"deniedResponsesPercentage":{"nullable":true,"type":"number"},"missingResponsesPercentage":{"nullable":true,"type":"number"},"totalOpenRequests":{"nullable":true,"type":"number"},"totalInReviewRequests":{"nullable":true,"type":"number"},"totalCompletedRequests":{"nullable":true,"type":"number"},"totalCompaniesInvited":{"nullable":true,"type":"number"},"totalRequestChanges":{"nullable":true,"type":"number"}},"additionalProperties":false},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"isRetraced":{"nullable":true,"type":"string"},"sortOrder":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"sortOrder":{"nullable":true,"type":"number"},"questionTypeId":{"nullable":true,"type":"string"},"questionnaireSectionId":{"nullable":true,"type":"string"},"retracedDatapointId":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"sectionId":{"nullable":true,"type":"string"},"isCustom":{"type":"boolean"},"meta":{"type":"object","properties":{},"additionalProperties":{}}},"required":["id","isCustom","meta"],"additionalProperties":{}}}},"required":["id","sections","questions"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"put":{"summary":"Save a questionnaire or template with its sections and questions","tags":["Questionnaire"],"description":"The builder's save, for a questionnaire or a template. `sections` and `questions` are the complete desired content, not a patch: rows present are created or updated, rows absent are deleted along with their answers and comments. `name`, `description` and `dueDate` are always written; `status` is not settable here and keeps its stored value. `dueDate` may be omitted or null — a template has no deadline of its own and always stores null, and on a questionnaire an omitted date clears it. The questionnaire must belong to the calling company — another company's is indistinguishable from a missing one and answers 404 — and a Retraced-owned questionnaire may only be saved by a Retraced admin. Once answer requests exist, an existing question's title, type, mandatory flag and options are frozen; adding a new question instead reopens every request so it can be answered. Moving the due date re-dates the still-open requests and notifies their answering companies. Answers the saved questionnaire in the same shape as the builder read.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"dueDate":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"string","nullable":true,"enum":[null]}]},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":64},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"string","nullable":true,"enum":[null]}]},"sortOrder":{"type":"number","minimum":1}},"required":["id","name","sortOrder"]}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"sectionId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"anyOf":[{"type":"string","maxLength":10000},{"type":"string","nullable":true,"enum":[null]}]},"questionTypeId":{"type":"string"},"retracedDatapointId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"isCustom":{"type":"boolean"},"meta":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"string","nullable":true,"enum":[null]}]},"sortOrder":{"type":"number","minimum":1}},"required":["id","sectionId","title","questionTypeId","isCustom"]}}},"required":["name","sections","questions"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"isRetraced":{"nullable":true,"type":"string"},"isTemplate":{"nullable":true,"type":"boolean"},"isArchived":{"nullable":true,"type":"number"},"isActive":{"nullable":true,"type":"number"},"templateId":{"nullable":true,"type":"string"},"statistics":{"nullable":true,"type":"object","properties":{"totalApprovedResponses":{"nullable":true,"type":"number"},"totalInReviewResponses":{"nullable":true,"type":"number"},"totalDeniedResponses":{"nullable":true,"type":"number"},"totalMissingResponses":{"nullable":true,"type":"number"},"totalQuestions":{"nullable":true,"type":"number"},"approvedResponsesPercentage":{"nullable":true,"type":"number"},"inReviewResponsesPercentage":{"nullable":true,"type":"number"},"deniedResponsesPercentage":{"nullable":true,"type":"number"},"missingResponsesPercentage":{"nullable":true,"type":"number"},"totalOpenRequests":{"nullable":true,"type":"number"},"totalInReviewRequests":{"nullable":true,"type":"number"},"totalCompletedRequests":{"nullable":true,"type":"number"},"totalCompaniesInvited":{"nullable":true,"type":"number"},"totalRequestChanges":{"nullable":true,"type":"number"}},"additionalProperties":false},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"isRetraced":{"nullable":true,"type":"string"},"sortOrder":{"nullable":true,"type":"number"}},"required":["id"],"additionalProperties":false}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"sortOrder":{"nullable":true,"type":"number"},"questionTypeId":{"nullable":true,"type":"string"},"questionnaireSectionId":{"nullable":true,"type":"string"},"retracedDatapointId":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"sectionId":{"nullable":true,"type":"string"},"isCustom":{"type":"boolean"},"meta":{"type":"object","properties":{},"additionalProperties":{}}},"required":["id","isCustom","meta"],"additionalProperties":{}}}},"required":["id","sections","questions"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/data-points":{"get":{"summary":"List the data points a questionnaire question can be built from","tags":["Questionnaire"],"description":"Every data point referenced by any profile template, resolved to its full definition — id, display name, answer type, impact area, selectable options and validation schema. Audit data points and four data points that cannot be answered by a supplier (country name, geojson, risk score, responsible person) are excluded. The catalogue is global rather than company-scoped, and unpaginated. Use `/data-points/templates` for the same set grouped by template, which is what a question library renders. Definitions carry `retracedId`, not `id`; the grouped variant adds `id` as an alias.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"retracedId":{"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"fieldTypeId":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"impactArea":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"sectionId":{"nullable":true,"type":"string"},"sortingId":{"nullable":true,"type":"number"},"options":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"externalIds":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"meta":{"nullable":true,"type":"object","properties":{},"additionalProperties":{}},"schema":{"nullable":true,"type":"object","properties":{},"additionalProperties":{}}},"required":["retracedId"],"additionalProperties":{}}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/data-points/templates":{"get":{"summary":"List the data points a question can be built from, by template","tags":["Questionnaire"],"description":"The same catalogue as `/data-points`, grouped into one entry per profile template — the shape a question library sidebar renders. `category` is the template id that groups the entry, `name` its display label. Each data point additionally carries `id`, an alias of `retracedId`. A template whose data points are all excluded from questionnaires still appears, with an empty list. The catalogue is global rather than company-scoped, and unpaginated.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"name":{"nullable":true,"type":"string"},"dataPoints":{"type":"array","items":{"type":"object","properties":{"retracedId":{"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"fieldTypeId":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"impactArea":{"nullable":true,"type":"string"},"impactAreaId":{"nullable":true,"type":"string"},"sectionId":{"nullable":true,"type":"string"},"sortingId":{"nullable":true,"type":"number"},"options":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"externalIds":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"meta":{"nullable":true,"type":"object","properties":{},"additionalProperties":{}},"schema":{"nullable":true,"type":"object","properties":{},"additionalProperties":{}},"id":{"type":"string"}},"required":["retracedId","id"],"additionalProperties":{}}}},"required":["category","dataPoints"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/data-points/{dataPointId}/companies/{companyId}":{"get":{"summary":"Read one datapoint's value from a company's profile","tags":["Questionnaire"],"description":"The read behind the answer page's \"use values from your company profile\" pre-fill: for one datapoint, what the company already has stored. Called once per datapoint-bound question, so it is a single-value lookup rather than a batch. `dataPointId` is a datapoint slug (`official_name`, `vat_id`), resolved through the datapoint library to the key that addresses the profile blob — an unrecognised slug answers 404 `data_point_not_found`. The profile is read from the caller's point of view: the datapoint's owning company is the path's `companyId`, but the profile must have been recorded *by* the caller's company, so a company with no such profile answers 404 `company_not_found` even when the company itself exists. That is the tenancy boundary, and it is a 404 rather than a 403 so it cannot be used to probe which companies exist. `value` is the stored blob passed through verbatim — shape depends on the datapoint's answer type, commonly `{value, unit, year}` — or `null` when no profile carries the key, which callers treat as nothing to pre-fill. The value is **not** restricted to the ABOUT profile: many datapoints are stored under other profile types (`OTHER_IDS`, `OPERATIONAL_METRICS`), and when the same key appears under more than one, ABOUT wins.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255},"in":"path","name":"dataPointId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"companyId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"dataPointId":{"type":"string"},"value":{}},"required":["dataPointId","value"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/questions/{questionId}/requests/{requestId}/comments":{"get":{"summary":"List the comments on one question of an answer request","tags":["Questionnaire Comments"],"description":"Paginated list of the comments left on a single question within one answer request — the read behind the comment thread on the answer and review pages. Readable by the three companies named on the request (the requester, the company being asked, and the company answering on its behalf); anyone else gets 404 rather than 403, so the endpoint never confirms a request they cannot read exists. A missing question answers 404 `questionnaire_not_found`. Comments come back oldest-first. The comment author is carried on the `updatedBy*` fields, not `createdBy*`.","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":15,"type":"integer","minimum":0,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","minLength":1},"in":"path","name":"questionId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"requestId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"questionId":{"type":"string"},"questionComment":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"}},"required":["id","questionId"],"additionalProperties":{}}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"post":{"summary":"Comment on one question of an answer request","tags":["Questionnaire Comments"],"description":"Files a comment against a single question within one answer request — the write behind the comment thread on the answer and review pages. Writable by the three companies named on the request (the requester, the company being asked, and the company answering on its behalf); anyone else gets 403 `cannot_update_questionnaire`. A missing question answers 404 `questionnaire_not_found`, a missing request 404 `request_not_found`. The comment author is recorded on the `updatedBy*` fields, not `createdBy*` — that is what the list read returns and both frontends render. Notifies the other party on the request.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"questionComment":{"type":"string","minLength":1,"maxLength":4000}},"required":["questionComment"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"questionId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"requestId","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"questionId":{"nullable":true,"type":"string"},"requestId":{"nullable":true,"type":"string"},"questionComment":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/questions/{questionId}/requests/{requestId}/comments/{commentId}":{"patch":{"summary":"Edit one comment on a question of an answer request","tags":["Questionnaire Comments"],"description":"Rewrites the text of a single comment in the thread on one question of one answer request — the write behind the inline edit in the comment popover on the answer and review pages. Only the comment author may edit it; anyone else gets 403 `cannot_update_question_comment`, including other people at the same company. The comment must be filed against the addressed question and request, otherwise 404 `question_comment_not_found` — the same code an unknown comment answers, so the endpoint never confirms a comment the caller cannot address exists elsewhere. The edit rewrites the `updatedBy*` fields, which is what both frontends render as the comment author; `createdBy*` is immutable.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"questionComment":{"type":"string","minLength":1,"maxLength":4000}},"required":["questionComment"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"questionId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"requestId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"commentId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"questionId":{"nullable":true,"type":"string"},"requestId":{"nullable":true,"type":"string"},"questionComment":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete one comment from a question of an answer request","tags":["Questionnaire Comments"],"description":"Permanently removes a single comment from the thread on one question of one answer request — the write behind the delete action in the comment popover on the answer and review pages. Only the comment author may delete it; anyone else gets 403 `cannot_delete_question_comment`, including other people at the same company. The comment must be filed against the addressed question and request, otherwise 404 `question_comment_not_found` — the same code an unknown comment answers, so the endpoint never confirms a comment the caller cannot address exists elsewhere. The delete is permanent: the row is removed, not flagged. Answers 204 with an empty body.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"questionId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"requestId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"commentId","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/requests/{requestId}/responses":{"post":{"summary":"Save answers to one questionnaire answer request","tags":["Questionnaire Responses"],"description":"Writes a batch of answers against a single answer request — the write behind every answer a supplier saves, the \"not available\" toggle, the bulk auto-fill from the company profile and the SLCP prefill. Only the company the request was addressed to may write to it; anyone else gets 404 `request_not_found`, so the existence of another company's request is never confirmed. A missing question answers 404 `question_not_found`, and an answer that fails its Retraced datapoint answers 400 `invalid_answer_for_datapoint`. On a CERTIFICATE question a newly linked certificate must be the one its option asks for — linking a certificate recorded against a different standard answers 400 `certificate_does_not_match_option`, naming both standards and what to do. Only pairings the request *introduces* are checked: one already stored is left alone, so a rule added after the fact can never stop a supplier saving. The check also only fires when the option and the certificate are both known and disagree, so an option this question does not have, an option carrying no standard, or a missing certificate all pass. Every answer is validated before any is written, so a batch containing one bad answer stores nothing; past that point the batch is not transactional, and an answer that fails after earlier ones have committed leaves those in place. Re-answering the same question **updates** the stored answer rather than adding a second one, keeping its id and any reviewer verdict, so re-submitting is a silent no-op by design. Answers omitting `status` default to `IN_REVIEW`. Answers to photo, video and audit questions also register their uploaded files and move them into private storage. Responds 201 with an empty body.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"verificationMeta":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"issuedOn":{"type":"string"},"version":{"type":"string"}},"additionalProperties":{}},"payload":{"type":"array","items":{"type":"object","properties":{"questionId":{"type":"string","minLength":1,"maxLength":64},"answer":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{}},{"type":"object","additionalProperties":{}},{"type":"string","nullable":true,"enum":[null]}]},"isNotAvailable":{"type":"integer","minimum":0,"maximum":1},"status":{"type":"string","enum":["APPROVED","DENIED","IN_REVIEW","NOT_SUBMITTED"]},"autoAnswered":{"type":"boolean"}},"required":["questionId","answer","isNotAvailable"]}}},"required":["payload"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"requestId","required":true}],"responses":{"201":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/questionnaires/requests/{requestId}/questions/{questionId}/response":{"patch":{"summary":"Set one answer's review status","tags":["Questionnaire Responses"],"description":"Records a reviewer's verdict on a single answer — the write behind the Approve and Deny buttons on the review-per-company panel and on the responder's read-only view of an `IN_REVIEW` request. Only the company that **sent** the request may review its answers; the company that was asked cannot approve its own, and gets 403 `cannot_update_response_status`. An unknown request answers 404 `request_not_found` and an unknown question 404 `question_not_found`, in that order — so a call naming both an unknown question and someone else's request reports the question. `APPROVED` and `DENIED` are the two a button sends; `IN_REVIEW` and `NOT_SUBMITTED` are also accepted, for API-key clients that have been sending them. Two things are deliberately quiet: patching a question the supplier never answered updates no rows and still responds 204, and the write stamps **no** audit columns, so an answer's status carries no record of who last moved it — matching every row already on the table. Recomputing the questionnaire's and the request's answer statistics is handed to the message worker over AMQP. Responds 204 with an empty body.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["APPROVED","DENIED","IN_REVIEW","NOT_SUBMITTED"]}},"required":["status"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"requestId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"questionId","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/v3/map/info":{"get":{"tags":["Products/Map"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"productId","required":false},{"schema":{"type":"string"},"in":"query","name":"tagId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"productId":{"type":"string"},"tagId":{"type":"string"},"shopId":{"type":"string"}},"required":["shopId"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}}}}},"/api/v3/map/random-product-id":{"get":{"tags":["Products/Map"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"productId":{"type":"string"},"shopId":{"type":"string"}},"required":["productId","shopId"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}}}}},"/api/risk-analysis/assessments/calculate":{"post":{"tags":["Risk Analysis"],"description":"Triggers recalculation of an assessment blueprint.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"blueprintId":{"type":"string","minLength":1,"maxLength":36},"companyIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":36}}},"required":["blueprintId"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/risk-analysis/assessments/calculate/standard-assessment":{"post":{"tags":["Risk Analysis"],"description":"Triggers recalculation against the caller's standard assessment blueprint, creating it and any missing company links first.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":36}}},"required":["companyIds"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}}}}},"/api/risk-analysis/blueprint-companies/bulk":{"post":{"tags":["Risk Analysis"],"description":"Links companies to an assessment blueprint in bulk.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":36}},"assessmentBlueprintId":{"type":"string","minLength":1,"maxLength":36}},"required":["companyIds","assessmentBlueprintId"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{},"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/risk-analysis/exports/assessments":{"post":{"tags":["Risk Analysis"],"description":"Record a risk assessment export request and enqueue the background export job.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assessmentBlueprintId":{"type":"string","minLength":1,"maxLength":36},"companyIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":36}}},"required":["assessmentBlueprintId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"blueprintId":{"type":"string"},"status":{"type":"string","enum":["IN_PROGRESS","COMPLETED","CANCELED"]},"createdAt":{"type":"string"},"createdByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"fileId":{"nullable":true,"type":"string"},"companyIds":{"type":"array","items":{"type":"string"}}},"required":["id","blueprintId","status","createdAt","createdByUserId","createdByCompanyId","fileId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"blueprintId":{"type":"string"},"status":{"type":"string","enum":["IN_PROGRESS","COMPLETED","CANCELED"]},"createdAt":{"type":"string"},"createdByUserId":{"type":"string"},"createdByCompanyId":{"type":"string"},"fileId":{"nullable":true,"type":"string"},"companyIds":{"type":"array","items":{"type":"string"}}},"required":["id","blueprintId","status","createdAt","createdByUserId","createdByCompanyId","fileId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/risk-analysis/mitigations":{"post":{"tags":["Risk Analysis"],"description":"Adds a manual mitigation to an assessment risk/metric pair.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assessmentId":{"type":"string","minLength":1,"maxLength":36},"riskId":{"type":"string","minLength":1,"maxLength":36},"metricId":{"type":"string","minLength":1,"maxLength":36},"forCompanyId":{"type":"string","minLength":1,"maxLength":36},"offset":{"type":"number","minimum":-5,"maximum":5},"remark":{"type":"string","minLength":1}},"required":["assessmentId","riskId","metricId","forCompanyId","offset","remark"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"mitigationId":{"type":"string","minLength":1,"maxLength":36},"blueprintId":{"nullable":true,"type":"string","minLength":1,"maxLength":36},"forCompanyId":{"nullable":true,"type":"string","minLength":1,"maxLength":36},"metricId":{"nullable":true,"type":"string","minLength":1,"maxLength":36},"ruleDatapointId":{"nullable":true,"type":"string","minLength":1,"maxLength":36},"ruleDatapointVersion":{"nullable":true,"type":"string","minLength":1,"maxLength":36},"mitigationType":{"nullable":true,"type":"string","minLength":1,"maxLength":128},"value":{"nullable":true,"type":"number","minimum":-5,"maximum":5},"valueType":{"nullable":true,"type":"string","minLength":1,"maxLength":128},"remark":{"nullable":true,"type":"string","minLength":1},"createdByUserId":{"nullable":true,"type":"string","minLength":1,"maxLength":36},"createdAt":{"nullable":true,"type":"string"},"meta":{"nullable":true,"type":"object","properties":{},"additionalProperties":{}}},"required":["mitigationId","blueprintId","forCompanyId","metricId","mitigationType","value","valueType","remark","createdByUserId","createdAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/risk-analysis/rule-templates/{id}":{"get":{"tags":["Risk Analysis"],"description":"Get a rule template by id.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":36},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"visibility":{"type":"string"},"description":{"nullable":true,"type":"string"},"scoreFormula":{"nullable":true,"type":"string"},"status":{"type":"string"},"tags":{"nullable":true,"type":"array","items":{"type":"string"}},"version":{"type":"number"},"type":{"type":"string"},"isActive":{"type":"number"},"defaultSeverity":{"nullable":true,"type":"number"},"createdAt":{"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"idx":{"type":"number"},"triggers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"idx":{"type":"number"},"connectorType":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}}]},"text":{"type":"string"}},"required":["key"],"additionalProperties":false},"dataPoint":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}}]},"text":{"type":"string"}},"required":["key"],"additionalProperties":false},"assetType":{},"asset":{},"operator":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}}]},"text":{"type":"string"}},"required":["key"],"additionalProperties":false}},"required":["id","idx","connectorType","dataPoint","assetType"],"additionalProperties":false}},"offsets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"offsetType":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}}]},"text":{"type":"string"}},"required":["key"],"additionalProperties":false},"metrics":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}}]},"text":{"type":"string"}},"required":["key"],"additionalProperties":false},"trueValue":{"type":"number"},"falseValue":{"type":"number"},"riskFactors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"text":{"type":"string"}},"required":["id","key"],"additionalProperties":false}}},"required":["id","trueValue","falseValue","riskFactors"],"additionalProperties":false}}},"required":["id","idx","triggers","offsets"],"additionalProperties":false}},"mismatchedDatapoint":{"type":"boolean"}},"required":["id","title","visibility","description","scoreFormula","status","tags","version","type","isActive","defaultSeverity","createdAt","createdByUserId","createdByCompanyId","updatedAt","updatedByUserId","updatedByCompanyId","rules","mismatchedDatapoint"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/integrations/amfori/credentials/":{"get":{"tags":["Integrations - Amfori"],"description":"Get the stored Amfori credentials for the current company. Returns 404 when nothing has been persisted yet.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"companyId":{"type":"string"},"clientId":{"nullable":true,"type":"string"},"clientSecretSet":{"type":"boolean"},"memberAmforiId":{"nullable":true,"type":"string"},"verifiedAt":{"nullable":true,"type":"string"},"lastSyncedAt":{"nullable":true,"type":"string"},"revokedAt":{"nullable":true,"type":"string"}},"required":["companyId","clientId","clientSecretSet","memberAmforiId","verifiedAt","lastSyncedAt","revokedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"put":{"tags":["Integrations - Amfori"],"description":"Create or update the Amfori credentials for the current company. When `clientSecret` is omitted, the previously stored secret is preserved and re-verified against the new `clientId`. Credentials are validated against the Amfori SSO endpoint before being persisted.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientId":{"type":"string","minLength":1},"clientSecret":{"type":"string","minLength":1}},"required":["clientId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"companyId":{"type":"string"},"clientId":{"nullable":true,"type":"string"},"clientSecretSet":{"type":"boolean"},"memberAmforiId":{"nullable":true,"type":"string"},"verifiedAt":{"nullable":true,"type":"string"},"lastSyncedAt":{"nullable":true,"type":"string"},"revokedAt":{"nullable":true,"type":"string"}},"required":["companyId","clientId","clientSecretSet","memberAmforiId","verifiedAt","lastSyncedAt","revokedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"delete":{"tags":["Integrations - Amfori"],"description":"Delete the stored Amfori credentials for the current company. Idempotent — returns 204 even if nothing was stored.","responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/integrations/amfori/credentials/test/":{"post":{"tags":["Integrations - Amfori"],"description":"Re-validate the stored Amfori credentials against the Amfori SSO endpoint. Refreshes `verifiedAt` on success. 404 when no credentials are stored.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"expiresIn":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"memberAmforiId":{"type":"string"}},"required":["ok","expiresIn","memberAmforiId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/integrations/amfori/suppliers/last-synced":{"get":{"tags":["Integrations - Amfori"],"description":"Bulk, brand-scoped list of each in-network supplier's amfori last-synced timestamp. Always 200 with an array (empty when the brand has no synced suppliers / no amfori network) — never 404.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"companyId":{"type":"string"},"lastSyncedAt":{"nullable":true,"type":"string"}},"required":["companyId","lastSyncedAt"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/integrations/amfori/suppliers/{companyId}":{"get":{"tags":["Integrations - Amfori"],"description":"Get the supplier-side Amfori link (business-partner id, site id, last-synced timestamp) for a supplier company. Gated by the caller brand-supplier relationship. An all-null triple for an authorized caller is a valid 200 with `linked: false`.","parameters":[{"schema":{"type":"string"},"in":"path","name":"companyId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"companyId":{"type":"string"},"businessPartnerId":{"nullable":true,"type":"string"},"siteId":{"nullable":true,"type":"string"},"lastSyncedAt":{"nullable":true,"type":"string"},"linked":{"type":"boolean"},"provenance":{"type":"string","enum":["SYNC","MANUAL"]},"siteIdUpdatedByName":{"nullable":true,"type":"string"},"siteIdUpdatedAt":{"nullable":true,"type":"string"}},"required":["companyId","businessPartnerId","siteId","lastSyncedAt","linked","provenance","siteIdUpdatedByName","siteIdUpdatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"put":{"tags":["Integrations - Amfori"],"description":"Manually set or clear (unlink, with `amforiSiteId: null`) a supplier's amfori site id. Gated by the caller→supplier relationship: a brand with an active link may edit; a supplier may NOT edit its own link (403). Returns 409 when the site id is already held by another supplier in the brand's network.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amforiSiteId":{"nullable":true,"type":"string","minLength":1}},"required":["amforiSiteId"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"companyId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"companyId":{"type":"string"},"businessPartnerId":{"nullable":true,"type":"string"},"siteId":{"nullable":true,"type":"string"},"lastSyncedAt":{"nullable":true,"type":"string"},"linked":{"type":"boolean"},"provenance":{"type":"string","enum":["SYNC","MANUAL"]},"siteIdUpdatedByName":{"nullable":true,"type":"string"},"siteIdUpdatedAt":{"nullable":true,"type":"string"}},"required":["companyId","businessPartnerId","siteId","lastSyncedAt","linked","provenance","siteIdUpdatedByName","siteIdUpdatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/integrations/amfori/suppliers/{companyId}/unlink":{"post":{"tags":["Integrations - Amfori"],"description":"Unlink a supplier's amfori Site ID and tear down its synced data: clears the Site ID (blocking future auto-re-matching until a human re-links), HARD-deletes the supplier's amfori-synced audits, and HARD-deletes its amfori-synced findings — all in one transaction. Gated by the caller→supplier relationship: a brand with an active link may unlink; a supplier may NOT unlink its own link (403). Returns the refreshed supplier link resource.","parameters":[{"schema":{"type":"string"},"in":"path","name":"companyId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"companyId":{"type":"string"},"businessPartnerId":{"nullable":true,"type":"string"},"siteId":{"nullable":true,"type":"string"},"lastSyncedAt":{"nullable":true,"type":"string"},"linked":{"type":"boolean"},"provenance":{"type":"string","enum":["SYNC","MANUAL"]},"siteIdUpdatedByName":{"nullable":true,"type":"string"},"siteIdUpdatedAt":{"nullable":true,"type":"string"}},"required":["companyId","businessPartnerId","siteId","lastSyncedAt","linked","provenance","siteIdUpdatedByName","siteIdUpdatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/orders/":{"get":{"tags":["Orders"],"description":"List the current company's orders. Supports free-text search (order number, shipment reference, supplier/buyer name, product name/code), multi-value CSV filters (type, status, supplier, buyer, tag, season, brand, internalResponsible — comma is reserved as the separator), order/delivery date ranges (deliveryDateVariant selects the agreed/handover/actual column), orderNumber, archived flag and updated-time range, plus pagination and sorting.","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"count","required":false},{"schema":{"type":"string"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","minLength":2,"maxLength":255},"in":"query","name":"search","required":false},{"schema":{"type":"string","maxLength":2000},"in":"query","name":"type","required":false},{"schema":{"type":"string","maxLength":2000},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":2000},"in":"query","name":"supplier","required":false},{"schema":{"type":"string","maxLength":2000},"in":"query","name":"buyer","required":false},{"schema":{"type":"string","maxLength":2000},"in":"query","name":"tag","required":false},{"schema":{"type":"string","maxLength":2000},"in":"query","name":"season","required":false},{"schema":{"type":"string","maxLength":2000},"in":"query","name":"brand","required":false},{"schema":{"type":"string","maxLength":2000},"in":"query","name":"internalResponsible","required":false},{"schema":{"type":"string"},"in":"query","name":"orderNumber","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"isArchived","required":false},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"updatedAfterUnixMs","required":false},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"updatedBeforeUnixMs","required":false},{"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"in":"query","name":"orderDateFrom","required":false},{"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"in":"query","name":"orderDateTo","required":false},{"schema":{"type":"string","enum":["agreed","handover","actual"]},"in":"query","name":"deliveryDateVariant","required":false},{"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"in":"query","name":"deliveryDateFrom","required":false},{"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"in":"query","name":"deliveryDateTo","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"type":"string"},"orderNumber":{"type":"string"},"orderType":{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER","INTERNAL_ORDER"]},"orderSubType":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"source":{"nullable":true,"type":"string"},"buyerCompanyId":{"type":"string"},"supplierCompanyId":{"type":"string"},"receiverCompanyId":{"type":"string"},"vendorCompanyId":{"nullable":true,"type":"string"},"factory":{"nullable":true,"type":"string"},"buyerFacilityProcess":{"nullable":true,"type":"string"},"supplierFacilityProcess":{"nullable":true,"type":"string"},"receiverFacilityProcess":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"type":"string"},"deliveryDate":{"nullable":true,"type":"string"},"agreedDeliveryDate":{"nullable":true,"type":"string"},"expectedShippingDate":{"nullable":true,"type":"string"},"shippingDate":{"nullable":true,"type":"string"},"handoverDate":{"nullable":true,"type":"string"},"actualDeliveryDate":{"nullable":true,"type":"string"},"shipmentReference":{"nullable":true,"type":"string"},"internalResponsiblePersons":{"default":[],"type":"array","items":{"type":"string"}},"styleProperties":{"type":"object","properties":{"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["seasons","brands"],"additionalProperties":false},"counterpartyOrderNumberRef":{"nullable":true,"type":"string"},"tracingAttachmentTemplateId":{"nullable":true,"type":"string"},"isArchived":{"type":"boolean"},"tracingStatus":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByImpersonateName":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"lineCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sentLineCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"readyLineCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastTracingRequestedAt":{"nullable":true,"type":"string"},"sentDateCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"permissions":{"type":"array","items":{"type":"string","enum":["read","edit","delete"]}},"lines":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineNumber":{"nullable":true,"type":"string"},"lineNo":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"styleId":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"tracingReflectionOrderId":{"nullable":true,"type":"string"},"tracingOrderRequestedAt":{"nullable":true,"type":"string"}},"required":["id","orderLineNumber","lineNo","styleId","quantity","unit","secondaryQuantity","secondaryUnit","tracingReflectionOrderId","tracingOrderRequestedAt"],"additionalProperties":false}}},"required":["id","forCompanyId","orderNumber","orderType","orderSubType","status","tags","source","buyerCompanyId","supplierCompanyId","receiverCompanyId","vendorCompanyId","factory","buyerFacilityProcess","supplierFacilityProcess","receiverFacilityProcess","orderDate","deliveryDate","agreedDeliveryDate","expectedShippingDate","shippingDate","handoverDate","actualDeliveryDate","shipmentReference","internalResponsiblePersons","counterpartyOrderNumberRef","tracingAttachmentTemplateId","isArchived","tracingStatus","createdAt","createdByUserId","createdByUserName","createdByCompanyId","createdByCompanyName","createdByImpersonateId","createdByImpersonateName","createdByApiKeyId","createdByApiKeyLabel","updatedAt","updatedByUserId","updatedByUserName","updatedByCompanyId","updatedByCompanyName","updatedByImpersonateId","updatedByImpersonateName","updatedByApiKeyId","updatedByApiKeyLabel","lineCount","sentLineCount","readyLineCount","lastTracingRequestedAt","sentDateCount","lines"],"additionalProperties":false}}},"required":["meta","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"post":{"tags":["Orders"],"description":"Create an order for the current company, optionally with nested order lines (created atomically with the order). The order number must be unique within the company for the same order type — a duplicate returns 400 (order_number_already_existing).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orderNumber":{"type":"string","minLength":1,"maxLength":255},"orderSubType":{"type":"string","enum":["STANDARD","REPEAT","COMMIT","SAMPLE","EXTRACTION_SPLIT"]},"status":{"type":"string","enum":["IN_PROGRESS","IN_REVIEW","COMPLETED"]},"tags":{"type":"array","items":{"type":"string"}},"source":{"default":"INTERNAL_API","type":"string","enum":["PUBLIC_API","IMPORTER","INTERNAL_API"]},"buyerCompanyId":{"type":"string","minLength":1,"maxLength":36},"supplierCompanyId":{"type":"string","minLength":1,"maxLength":36},"receiverCompanyId":{"type":"string","maxLength":36},"vendorCompanyId":{"type":"string","maxLength":36},"factory":{"type":"string","maxLength":36},"buyerFacilityProcess":{"type":"string","maxLength":255},"supplierFacilityProcess":{"type":"string","maxLength":255},"receiverFacilityProcess":{"type":"string","maxLength":255},"orderDate":{"type":"string","format":"date","example":"2026-07-21"},"deliveryDate":{"type":"string","format":"date","example":"2026-07-21"},"agreedDeliveryDate":{"type":"string","format":"date","example":"2026-07-21"},"expectedShippingDate":{"type":"string","format":"date","example":"2026-07-21"},"shippingDate":{"type":"string","format":"date","example":"2026-07-21"},"handoverDate":{"type":"string","format":"date","example":"2026-07-21"},"actualDeliveryDate":{"type":"string","format":"date","example":"2026-07-21"},"shipmentReference":{"type":"string","maxLength":255},"internalResponsiblePersons":{"type":"array","items":{"type":"string","maxLength":255}},"counterpartyOrderNumberRef":{"type":"string"},"tracingAttachmentTemplateId":{"nullable":true,"type":"string","minLength":1,"maxLength":36},"orderType":{"nullable":true,"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER","INTERNAL_ORDER"]},"tracingStatus":{"nullable":true,"type":"string","maxLength":255},"isArchived":{"type":"boolean"},"isAuto":{"default":false,"type":"boolean"},"lines":{"type":"array","items":{"type":"object","properties":{"orderLineNumber":{"type":"string","minLength":1,"maxLength":255},"styleId":{"type":"string","minLength":1,"maxLength":255},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":100000000000000000,"exclusiveMaximum":true},"unit":{"type":"string","enum":["LITRE","MILLILITRE","CENTILITRE","CUBIC_DECIMETRE","CUBIC_METRE","GALLON","QUART","PINT","GILL","FLUID_OUNCE","FLUID_DRAM","MINIM","BUSHEL","ACRE_FOOT","CORD","CUBIC_YARD","CUBIC_FOOT","CUBIC_INCH","PECK","METRE","MILLIMETRE","DECIMETRE","CENTIMETRE","INCH","NAUTICAL_MILE","MILE","FURLONG","ROD","FATHOM","YARD","FOOT","GRAM","GRAM_PER_SQUARE_METER","GRAM_PER_SQUARE_FOOT","GRAM_PER_SQUARE_YARD","OUNCE_PER_SQUARE_YARD","MILLIGRAM","KILOGRAM","METRIC_TON","POUNDS","SHORT_TON","LONG_TON","HUNDREDWEIGHT","SHORT_HUNDREDWEIGHT","LONG_HUNDREDWEIGHT","OUNCE","DRAM","GRAIN","PENNYWEIGHT","SCRUPLE","STONE","SQUARE_METRE","SQUARE_DECIMETRE","SQUARE_CENTIMETRE","SQUARE_INCH","SQUARE_MILE","SQUARE_FEET","SQUARE_ROD","SQUARE_YARD","ACRE","PIECES","PAIR","PERCENTAGE","DENIER","JUTE","ENGLISH_COUNT","METRIC_COUNT","WORSTED_COUNT","TEX","KILOWATT_HOUR","MOUND"]},"secondaryQuantity":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":100000000000000000,"exclusiveMaximum":true},"secondaryUnit":{"type":"string","enum":["KILOGRAM"]}},"required":["styleId","quantity","unit"],"additionalProperties":false}}},"required":["orderNumber","buyerCompanyId","supplierCompanyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"type":"string"},"orderNumber":{"type":"string"},"orderType":{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER","INTERNAL_ORDER"]},"orderSubType":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"source":{"nullable":true,"type":"string"},"buyerCompanyId":{"type":"string"},"supplierCompanyId":{"type":"string"},"receiverCompanyId":{"type":"string"},"vendorCompanyId":{"nullable":true,"type":"string"},"factory":{"nullable":true,"type":"string"},"buyerFacilityProcess":{"nullable":true,"type":"string"},"supplierFacilityProcess":{"nullable":true,"type":"string"},"receiverFacilityProcess":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"type":"string"},"deliveryDate":{"nullable":true,"type":"string"},"agreedDeliveryDate":{"nullable":true,"type":"string"},"expectedShippingDate":{"nullable":true,"type":"string"},"shippingDate":{"nullable":true,"type":"string"},"handoverDate":{"nullable":true,"type":"string"},"actualDeliveryDate":{"nullable":true,"type":"string"},"shipmentReference":{"nullable":true,"type":"string"},"internalResponsiblePersons":{"default":[],"type":"array","items":{"type":"string"}},"styleProperties":{"type":"object","properties":{"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["seasons","brands"],"additionalProperties":false},"counterpartyOrderNumberRef":{"nullable":true,"type":"string"},"tracingAttachmentTemplateId":{"nullable":true,"type":"string"},"isArchived":{"type":"boolean"},"tracingStatus":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByImpersonateName":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"lineCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sentLineCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"readyLineCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastTracingRequestedAt":{"nullable":true,"type":"string"},"sentDateCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"permissions":{"type":"array","items":{"type":"string","enum":["read","edit","delete"]}},"lines":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineNumber":{"nullable":true,"type":"string"},"lineNo":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"styleId":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"tracingReflectionOrderId":{"nullable":true,"type":"string"},"tracingOrderRequestedAt":{"nullable":true,"type":"string"}},"required":["id","orderLineNumber","lineNo","styleId","quantity","unit","secondaryQuantity","secondaryUnit","tracingReflectionOrderId","tracingOrderRequestedAt"],"additionalProperties":false}}},"required":["id","forCompanyId","orderNumber","orderType","orderSubType","status","tags","source","buyerCompanyId","supplierCompanyId","receiverCompanyId","vendorCompanyId","factory","buyerFacilityProcess","supplierFacilityProcess","receiverFacilityProcess","orderDate","deliveryDate","agreedDeliveryDate","expectedShippingDate","shippingDate","handoverDate","actualDeliveryDate","shipmentReference","internalResponsiblePersons","counterpartyOrderNumberRef","tracingAttachmentTemplateId","isArchived","tracingStatus","createdAt","createdByUserId","createdByUserName","createdByCompanyId","createdByCompanyName","createdByImpersonateId","createdByImpersonateName","createdByApiKeyId","createdByApiKeyLabel","updatedAt","updatedByUserId","updatedByUserName","updatedByCompanyId","updatedByCompanyName","updatedByImpersonateId","updatedByImpersonateName","updatedByApiKeyId","updatedByApiKeyLabel","lineCount","sentLineCount","readyLineCount","lastTracingRequestedAt","sentDateCount","lines"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/orders/export":{"post":{"tags":["Orders"],"description":"Start an async XLSX export of the current company's orders, one row per order line. `scope: 'all'` exports every active order, `'filtered'` applies the same filters and search as `GET /orders`, `'selected'` exports the given `orderIds`. `sort` is honoured in all scopes so the file matches the on-screen order. Returns an `exportId` — poll `GET /exports/:id` for status; an email and in-app notification carry the download link when the file is ready.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["all","filtered","selected"]},"orderIds":{"maxItems":5000,"type":"array","items":{"type":"string","maxLength":36}},"sort":{"type":"string","maxLength":64},"filters":{"type":"object","properties":{"search":{"type":"string","minLength":2,"maxLength":255},"type":{"maxItems":100,"type":"array","items":{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER","INTERNAL_ORDER"]}},"status":{"maxItems":100,"type":"array","items":{"type":"string","enum":["IN_PROGRESS","IN_REVIEW","COMPLETED"]}},"supplier":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":255}},"buyer":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":255}},"tag":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":255}},"season":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":255}},"brand":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":255}},"internalResponsible":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":255}},"orderNumber":{"type":"string"},"isArchived":{"type":"boolean"},"updatedAfterUnixMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"updatedBeforeUnixMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"orderDateFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"orderDateTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"deliveryDateVariant":{"type":"string","enum":["agreed","handover","actual"]},"deliveryDateFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"deliveryDateTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}}}},"required":["scope"]}}}},"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"exportId":{"type":"string"},"message":{"type":"string"}},"required":["exportId","message"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/orders/bulk-import":{"post":{"tags":["Orders"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orders":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"object","properties":{"rowNumbers":{"minItems":1,"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}},"orderNumber":{"type":"string","minLength":1,"maxLength":255},"orderSubType":{"type":"string","enum":["STANDARD","REPEAT","COMMIT","SAMPLE","EXTRACTION_SPLIT"]},"status":{"type":"string","enum":["IN_PROGRESS","IN_REVIEW","COMPLETED"]},"source":{"type":"string","enum":["PUBLIC_API","IMPORTER","INTERNAL_API"]},"counterpartyOrderNumberRef":{"type":"string","maxLength":255},"tags":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":255}},"orderDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"deliveryDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"agreedDeliveryDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"expectedShippingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"shippingDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"handoverDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"actualDeliveryDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"shipmentReference":{"type":"string","maxLength":255},"internalResponsiblePersons":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":255}},"supplier":{"type":"object","properties":{"internalCompanyCode":{"type":"string","maxLength":255},"officialName":{"type":"string","maxLength":255}},"additionalProperties":false},"buyer":{"type":"object","properties":{"internalCompanyCode":{"type":"string","maxLength":255},"officialName":{"type":"string","maxLength":255}},"additionalProperties":false},"receiver":{"type":"object","properties":{"internalCompanyCode":{"type":"string","maxLength":255},"officialName":{"type":"string","maxLength":255}},"additionalProperties":false},"vendor":{"type":"object","properties":{"internalCompanyCode":{"type":"string","maxLength":255},"officialName":{"type":"string","maxLength":255}},"additionalProperties":false},"factory":{"type":"object","properties":{"internalCompanyCode":{"type":"string","maxLength":255},"officialName":{"type":"string","maxLength":255}},"additionalProperties":false},"supplierFacilityProcess":{"type":"string","maxLength":255},"buyerFacilityProcess":{"type":"string","maxLength":255},"receiverFacilityProcess":{"type":"string","maxLength":255},"lines":{"default":[],"type":"array","items":{"type":"object","properties":{"orderLineId":{"type":"string","maxLength":36},"orderLineNumber":{"type":"string","maxLength":255},"productCode":{"type":"string","minLength":1,"maxLength":255},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"unit":{"type":"string","minLength":1,"maxLength":64},"secondaryQuantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"rowNumber":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["productCode","quantity","unit","rowNumber"],"additionalProperties":false}},"replaceAllLines":{"default":false,"type":"boolean"}},"required":["rowNumbers","orderNumber","supplier","buyer"],"additionalProperties":false}}},"required":["orders"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"bulkImportId":{"type":"string"},"message":{"type":"string"},"totalRows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"batchCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["bulkImportId","message","totalRows","batchCount"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/orders/check-order-numbers":{"post":{"tags":["Orders"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orders":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"object","properties":{"orderNumber":{"type":"string","minLength":1,"maxLength":255},"supplier":{"type":"object","properties":{"internalCompanyCode":{"type":"string","maxLength":255},"officialName":{"type":"string","maxLength":255}},"additionalProperties":false},"buyer":{"type":"object","properties":{"internalCompanyCode":{"type":"string","maxLength":255},"officialName":{"type":"string","maxLength":255}},"additionalProperties":false}},"required":["orderNumber","supplier","buyer"],"additionalProperties":false}}},"required":["orders"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"existing":{"type":"array","items":{"type":"string"}},"archived":{"type":"array","items":{"type":"string"}}},"required":["existing","archived"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/orders/resolve-companies":{"post":{"tags":["Orders"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"parties":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"object","properties":{"internalCompanyCode":{"type":"string","maxLength":255},"officialName":{"type":"string","maxLength":255}},"additionalProperties":false}}},"required":["parties"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"resolved":{"type":"object","additionalProperties":{"nullable":true,"type":"string"}},"ambiguous":{"type":"array","items":{"type":"string"}}},"required":["resolved","ambiguous"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/orders/{id}/send-to-tracing":{"post":{"tags":["Orders"],"description":"Send order lines to tracing: every sendable line becomes its own tracing request. Pass orderLineIds for an explicit selection; omit it to send all unsent lines. Lines that cannot be sent are reported in skippedLines.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orderLineIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"notifySupplier":{"default":true,"type":"boolean"},"attachmentTemplateId":{"type":"string","minLength":1}}}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"orderId":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"orderLineId":{"type":"string"},"orderLineNumber":{"type":"string"},"tracingOrderId":{"type":"string"},"tracingReflectionOrderId":{"type":"string"},"tracingOrderRequestedAt":{"type":"string"}},"required":["orderLineId","orderLineNumber","tracingOrderId","tracingReflectionOrderId","tracingOrderRequestedAt"],"additionalProperties":false}},"skippedLines":{"type":"array","items":{"type":"object","properties":{"orderLineId":{"type":"string"},"orderLineNumber":{"nullable":true,"type":"string"},"reasons":{"type":"array","items":{"type":"string"}}},"required":["orderLineId","orderLineNumber","reasons"],"additionalProperties":false}}},"required":["orderId","results","skippedLines"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/orders/{id}":{"get":{"tags":["Orders"],"description":"Fetch a single order by id. Returns 404 when the order is removed or belongs to another company.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"type":"string"},"orderNumber":{"type":"string"},"orderType":{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER","INTERNAL_ORDER"]},"orderSubType":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"source":{"nullable":true,"type":"string"},"buyerCompanyId":{"type":"string"},"supplierCompanyId":{"type":"string"},"receiverCompanyId":{"type":"string"},"vendorCompanyId":{"nullable":true,"type":"string"},"factory":{"nullable":true,"type":"string"},"buyerFacilityProcess":{"nullable":true,"type":"string"},"supplierFacilityProcess":{"nullable":true,"type":"string"},"receiverFacilityProcess":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"type":"string"},"deliveryDate":{"nullable":true,"type":"string"},"agreedDeliveryDate":{"nullable":true,"type":"string"},"expectedShippingDate":{"nullable":true,"type":"string"},"shippingDate":{"nullable":true,"type":"string"},"handoverDate":{"nullable":true,"type":"string"},"actualDeliveryDate":{"nullable":true,"type":"string"},"shipmentReference":{"nullable":true,"type":"string"},"internalResponsiblePersons":{"default":[],"type":"array","items":{"type":"string"}},"styleProperties":{"type":"object","properties":{"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["seasons","brands"],"additionalProperties":false},"counterpartyOrderNumberRef":{"nullable":true,"type":"string"},"tracingAttachmentTemplateId":{"nullable":true,"type":"string"},"isArchived":{"type":"boolean"},"tracingStatus":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByImpersonateName":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"lineCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sentLineCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"readyLineCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastTracingRequestedAt":{"nullable":true,"type":"string"},"sentDateCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"permissions":{"type":"array","items":{"type":"string","enum":["read","edit","delete"]}},"lines":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineNumber":{"nullable":true,"type":"string"},"lineNo":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"styleId":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"tracingReflectionOrderId":{"nullable":true,"type":"string"},"tracingOrderRequestedAt":{"nullable":true,"type":"string"}},"required":["id","orderLineNumber","lineNo","styleId","quantity","unit","secondaryQuantity","secondaryUnit","tracingReflectionOrderId","tracingOrderRequestedAt"],"additionalProperties":false}}},"required":["id","forCompanyId","orderNumber","orderType","orderSubType","status","tags","source","buyerCompanyId","supplierCompanyId","receiverCompanyId","vendorCompanyId","factory","buyerFacilityProcess","supplierFacilityProcess","receiverFacilityProcess","orderDate","deliveryDate","agreedDeliveryDate","expectedShippingDate","shippingDate","handoverDate","actualDeliveryDate","shipmentReference","internalResponsiblePersons","counterpartyOrderNumberRef","tracingAttachmentTemplateId","isArchived","tracingStatus","createdAt","createdByUserId","createdByUserName","createdByCompanyId","createdByCompanyName","createdByImpersonateId","createdByImpersonateName","createdByApiKeyId","createdByApiKeyLabel","updatedAt","updatedByUserId","updatedByUserName","updatedByCompanyId","updatedByCompanyName","updatedByImpersonateId","updatedByImpersonateName","updatedByApiKeyId","updatedByApiKeyLabel","lineCount","sentLineCount","readyLineCount","lastTracingRequestedAt","sentDateCount","lines"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"patch":{"tags":["Orders"],"description":"Partially update an order owned by the current company.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orderNumber":{"type":"string","minLength":1,"maxLength":255},"orderSubType":{"nullable":true,"type":"string","enum":["STANDARD","REPEAT","COMMIT","SAMPLE","EXTRACTION_SPLIT"]},"status":{"nullable":true,"type":"string","enum":["IN_PROGRESS","IN_REVIEW","COMPLETED"]},"tags":{"type":"array","items":{"type":"string"}},"buyerCompanyId":{"type":"string","minLength":1,"maxLength":36},"supplierCompanyId":{"type":"string","minLength":1,"maxLength":36},"receiverCompanyId":{"nullable":true,"type":"string","maxLength":36},"vendorCompanyId":{"nullable":true,"type":"string","maxLength":36},"factory":{"nullable":true,"type":"string","maxLength":36},"buyerFacilityProcess":{"nullable":true,"type":"string","maxLength":255},"supplierFacilityProcess":{"nullable":true,"type":"string","maxLength":255},"receiverFacilityProcess":{"nullable":true,"type":"string","maxLength":255},"orderDate":{"nullable":true,"type":"string","format":"date","example":"2026-07-21"},"deliveryDate":{"nullable":true,"type":"string","format":"date","example":"2026-07-21"},"agreedDeliveryDate":{"nullable":true,"type":"string","format":"date","example":"2026-07-21"},"expectedShippingDate":{"nullable":true,"type":"string","format":"date","example":"2026-07-21"},"shippingDate":{"nullable":true,"type":"string","format":"date","example":"2026-07-21"},"handoverDate":{"nullable":true,"type":"string","format":"date","example":"2026-07-21"},"actualDeliveryDate":{"nullable":true,"type":"string","format":"date","example":"2026-07-21"},"shipmentReference":{"nullable":true,"type":"string","maxLength":255},"internalResponsiblePersons":{"nullable":true,"type":"array","items":{"type":"string","maxLength":255}},"counterpartyOrderNumberRef":{"nullable":true,"type":"string"},"tracingAttachmentTemplateId":{"nullable":true,"type":"string","minLength":1,"maxLength":36},"orderType":{"nullable":true,"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER","INTERNAL_ORDER"]},"tracingStatus":{"nullable":true,"type":"string","maxLength":255},"isArchived":{"type":"boolean"},"isAuto":{"default":false,"type":"boolean"},"lines":{"type":"array","items":{"type":"object","properties":{"orderLineNumber":{"type":"string","minLength":1,"maxLength":255},"styleId":{"type":"string","minLength":1,"maxLength":255},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":100000000000000000,"exclusiveMaximum":true},"unit":{"type":"string","enum":["LITRE","MILLILITRE","CENTILITRE","CUBIC_DECIMETRE","CUBIC_METRE","GALLON","QUART","PINT","GILL","FLUID_OUNCE","FLUID_DRAM","MINIM","BUSHEL","ACRE_FOOT","CORD","CUBIC_YARD","CUBIC_FOOT","CUBIC_INCH","PECK","METRE","MILLIMETRE","DECIMETRE","CENTIMETRE","INCH","NAUTICAL_MILE","MILE","FURLONG","ROD","FATHOM","YARD","FOOT","GRAM","GRAM_PER_SQUARE_METER","GRAM_PER_SQUARE_FOOT","GRAM_PER_SQUARE_YARD","OUNCE_PER_SQUARE_YARD","MILLIGRAM","KILOGRAM","METRIC_TON","POUNDS","SHORT_TON","LONG_TON","HUNDREDWEIGHT","SHORT_HUNDREDWEIGHT","LONG_HUNDREDWEIGHT","OUNCE","DRAM","GRAIN","PENNYWEIGHT","SCRUPLE","STONE","SQUARE_METRE","SQUARE_DECIMETRE","SQUARE_CENTIMETRE","SQUARE_INCH","SQUARE_MILE","SQUARE_FEET","SQUARE_ROD","SQUARE_YARD","ACRE","PIECES","PAIR","PERCENTAGE","DENIER","JUTE","ENGLISH_COUNT","METRIC_COUNT","WORSTED_COUNT","TEX","KILOWATT_HOUR","MOUND"]},"secondaryQuantity":{"nullable":true,"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":100000000000000000,"exclusiveMaximum":true},"secondaryUnit":{"nullable":true,"type":"string","enum":["KILOGRAM"]},"id":{"type":"string","minLength":1,"maxLength":36}},"additionalProperties":false}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"type":"string"},"orderNumber":{"type":"string"},"orderType":{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER","INTERNAL_ORDER"]},"orderSubType":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"source":{"nullable":true,"type":"string"},"buyerCompanyId":{"type":"string"},"supplierCompanyId":{"type":"string"},"receiverCompanyId":{"type":"string"},"vendorCompanyId":{"nullable":true,"type":"string"},"factory":{"nullable":true,"type":"string"},"buyerFacilityProcess":{"nullable":true,"type":"string"},"supplierFacilityProcess":{"nullable":true,"type":"string"},"receiverFacilityProcess":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"type":"string"},"deliveryDate":{"nullable":true,"type":"string"},"agreedDeliveryDate":{"nullable":true,"type":"string"},"expectedShippingDate":{"nullable":true,"type":"string"},"shippingDate":{"nullable":true,"type":"string"},"handoverDate":{"nullable":true,"type":"string"},"actualDeliveryDate":{"nullable":true,"type":"string"},"shipmentReference":{"nullable":true,"type":"string"},"internalResponsiblePersons":{"default":[],"type":"array","items":{"type":"string"}},"styleProperties":{"type":"object","properties":{"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["seasons","brands"],"additionalProperties":false},"counterpartyOrderNumberRef":{"nullable":true,"type":"string"},"tracingAttachmentTemplateId":{"nullable":true,"type":"string"},"isArchived":{"type":"boolean"},"tracingStatus":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByImpersonateName":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"lineCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sentLineCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"readyLineCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastTracingRequestedAt":{"nullable":true,"type":"string"},"sentDateCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"permissions":{"type":"array","items":{"type":"string","enum":["read","edit","delete"]}},"lines":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderLineNumber":{"nullable":true,"type":"string"},"lineNo":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"styleId":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"tracingReflectionOrderId":{"nullable":true,"type":"string"},"tracingOrderRequestedAt":{"nullable":true,"type":"string"}},"required":["id","orderLineNumber","lineNo","styleId","quantity","unit","secondaryQuantity","secondaryUnit","tracingReflectionOrderId","tracingOrderRequestedAt"],"additionalProperties":false}}},"required":["id","forCompanyId","orderNumber","orderType","orderSubType","status","tags","source","buyerCompanyId","supplierCompanyId","receiverCompanyId","vendorCompanyId","factory","buyerFacilityProcess","supplierFacilityProcess","receiverFacilityProcess","orderDate","deliveryDate","agreedDeliveryDate","expectedShippingDate","shippingDate","handoverDate","actualDeliveryDate","shipmentReference","internalResponsiblePersons","counterpartyOrderNumberRef","tracingAttachmentTemplateId","isArchived","tracingStatus","createdAt","createdByUserId","createdByUserName","createdByCompanyId","createdByCompanyName","createdByImpersonateId","createdByImpersonateName","createdByApiKeyId","createdByApiKeyLabel","updatedAt","updatedByUserId","updatedByUserName","updatedByCompanyId","updatedByCompanyName","updatedByImpersonateId","updatedByImpersonateName","updatedByApiKeyId","updatedByApiKeyLabel","lineCount","sentLineCount","readyLineCount","lastTracingRequestedAt","sentDateCount","lines"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"delete":{"tags":["Orders"],"description":"Hard-delete an order and all of its lines. Returns 404 when the order does not exist or belongs to another company.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/orders/bulk":{"patch":{"tags":["Orders"],"description":"Apply a narrow patch (status / archive state / tracing attachment template) to many orders owned by the current company.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":36}},"patch":{"type":"object","properties":{"isArchived":{"type":"boolean"},"status":{"type":"string","enum":["IN_PROGRESS","IN_REVIEW","COMPLETED"]},"tracingAttachmentTemplateId":{"nullable":true,"type":"string","minLength":1,"maxLength":36}}}},"required":["ids","patch"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"updatedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failedIds":{"type":"array","items":{"type":"string"}}},"required":["updatedCount","failedIds"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/automation-rules/fields":{"get":{"tags":["Automation Rules"],"description":"The condition-field catalog: which fields a rule may filter on, how they are grouped, and which operators each one allows. Seeded data — the condition builder renders itself from this, so adding a field never needs a frontend release.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"fields":{"type":"array","items":{"type":"object","properties":{"fieldKey":{"type":"string"},"fieldGroup":{"type":"string"},"label":{"type":"string"},"resourceType":{"type":"string"},"dataType":{"type":"string","enum":["text","text[]","uuid","numeric","date"]},"operators":{"type":"array","items":{"type":"string","enum":["is","is_not","contains","not_contains","gt","lt","more_than","fewer_than"]}},"referenceSource":{"nullable":true,"type":"string","enum":["companies","style_properties:brands","style_properties:seasons","materials","order_tags","order_types","order_line_units"]},"sortOrder":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["fieldKey","fieldGroup","label","resourceType","dataType","operators","referenceSource","sortOrder"],"additionalProperties":false}}},"required":["fields"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/automation-rules/workflow-templates":{"get":{"tags":["Automation Rules"],"description":"The catalog of actions a rule can fire, with each step's configuration schema. Creating a rule from a template copies its steps, so a later change to the template never alters a rule that is already attached. Render the Action panel from `steps[].configSchema` rather than hard-coding it.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"status":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"stepIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"stepKey":{"type":"string"},"stepType":{"type":"string"},"dependsOn":{"type":"array","items":{"type":"string"}},"defaultConfig":{"type":"object","additionalProperties":{}},"configSchema":{"nullable":true,"type":"object","properties":{"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"hint":{"type":"string"},"type":{"type":"string","enum":["reference","boolean","text","number"]},"source":{"type":"string"},"required":{"default":false,"type":"boolean"},"default":{}},"required":["key","label","type","required"],"additionalProperties":false}}},"required":["fields"],"additionalProperties":false},"runIf":{"nullable":true,"type":"string"},"isGate":{"type":"boolean"}},"required":["id","stepIndex","stepKey","stepType","dependsOn","defaultConfig","configSchema","runIf","isGate"],"additionalProperties":false}},"requirements":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"sortOrder":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"severity":{"type":"string","enum":["required","recommended"]}},"required":["key","label","sortOrder","severity"],"additionalProperties":false}}},"required":["id","key","name","description","status","steps","requirements"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/automation-rules/workflows":{"get":{"tags":["Automation Rules"],"description":"This company's configured workflows — each one a copy of a template plus the answers it was created with. A rule attaches one of these by id, and several rules can share the same workflow.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"templateKey","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workflowTemplateId":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"status":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"stepIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"stepKey":{"type":"string"},"stepType":{"type":"string"},"dependsOn":{"type":"array","items":{"type":"string"}},"config":{"type":"object","additionalProperties":{}},"runIf":{"nullable":true,"type":"string"},"isGate":{"type":"boolean"}},"required":["id","stepIndex","stepKey","stepType","dependsOn","config","runIf","isGate"],"additionalProperties":false}},"requirements":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"sortOrder":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"severity":{"type":"string","enum":["required","recommended"]}},"required":["key","label","sortOrder","severity"],"additionalProperties":false}},"createdAt":{"nullable":true,"type":"string"}},"required":["id","workflowTemplateId","key","name","description","status","steps","requirements","createdAt"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/automation-rules/{id}/runs/{runId}/executions":{"get":{"tags":["Automation Rules"],"description":"The resources one run acted on, and why any of them did not fire. A run’s counters say how many were blocked; this says which ones and what they were missing.","parameters":[{"schema":{"default":50,"type":"integer","minimum":1,"maximum":200},"in":"query","name":"limit","required":false},{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false},{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"runId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"resourceId":{"type":"string"},"resourceLabel":{"nullable":true,"type":"string"},"status":{"type":"string"},"blockedReason":{"nullable":true,"type":"string"},"failedStepKey":{"nullable":true,"type":"string"},"error":{"nullable":true,"type":"string"},"finishedAt":{"nullable":true,"type":"string"}},"required":["id","resourceId","resourceLabel","status","blockedReason","failedStepKey","error","finishedAt"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/automation-rules/{id}/runs":{"get":{"tags":["Automation Rules"],"description":"The history of this rule firing, newest first. Each run records what the matcher found and how its executions ended, so a run can be read without loading the executions themselves.","parameters":[{"schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false},{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ruleId":{"type":"string"},"triggerType":{"type":"string","enum":["cron","manual"]},"status":{"type":"string","enum":["running","done","failed"]},"anchorDate":{"nullable":true,"type":"string"},"matchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"firedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"blockedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"failedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"startedAt":{"type":"string"},"finishedAt":{"nullable":true,"type":"string"},"error":{"nullable":true,"type":"string"}},"required":["id","ruleId","triggerType","status","anchorDate","matchedCount","firedCount","blockedCount","failedCount","startedAt","finishedAt","error"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/automation-rules/":{"get":{"tags":["Automation Rules"],"description":"This company's automation rules. `tab=archive` returns archived rules instead of the live ones, and `blockedOnly` narrows to rules whose most recent run blocked something. Each row carries its condition tree already flattened to text and the counts from its last run.","parameters":[{"schema":{"default":"active","type":"string","enum":["active","archive"]},"in":"query","name":"tab","required":false},{"schema":{"default":false,"type":"boolean"},"in":"query","name":"blockedOnly","required":false},{"schema":{"type":"string"},"in":"query","name":"sort","required":false},{"schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"description":"Current page number (1-based).","type":"number"},"limit":{"default":10,"description":"Page size used for this response. Endpoint defaults vary — see each endpoint's limit parameter.","type":"number"},"total":{"default":0,"description":"Total number of records across all pages.","type":"number"},"totalPages":{"default":0,"description":"Total number of pages. Iterate until page reaches totalPages.","type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["draft","active","paused","archived"]},"resourceType":{"type":"string"},"workflowId":{"type":"string"},"workflowKey":{"type":"string"},"workflowName":{"type":"string"},"conditionsText":{"type":"string"},"triggerCron":{"type":"string"},"timezone":{"type":"string"},"lastRunAt":{"nullable":true,"type":"string"},"nextRunAt":{"nullable":true,"type":"string"},"lastRun":{"nullable":true,"type":"object","properties":{"status":{"type":"string"},"matchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"firedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"blockedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"failedCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["status","matchedCount","firedCount","blockedCount","failedCount"],"additionalProperties":false},"updatedAt":{"nullable":true,"type":"string"}},"required":["id","name","description","status","resourceType","workflowId","workflowKey","workflowName","conditionsText","triggerCron","timezone","lastRunAt","nextRunAt","lastRun","updatedAt"],"additionalProperties":false}},"blockedCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["rules","blockedCount"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"post":{"tags":["Automation Rules"],"description":"Create an automation rule for the current company. The rule is saved as a draft unless status is set to active. Conditions must include at least one positive condition — a rule made only of negations matches nearly every order line.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"nullable":true,"type":"string","maxLength":2000},"workflowId":{"type":"string","minLength":1},"workflowTemplateKey":{"type":"string","minLength":1},"stepConfigs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{}}},"triggerCron":{"default":"0 2 * * *","type":"string","minLength":1,"pattern":"^(\\S+\\s+){4}\\S+$"},"timezone":{"default":"UTC","type":"string","minLength":1},"status":{"default":"draft","type":"string","enum":["draft","active"]},"conditions":{"$ref":"#/components/schemas/schema0Input"}},"required":["name","conditions"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"resourceType":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","archived"]},"workflowId":{"type":"string"},"workflowKey":{"type":"string"},"triggerCron":{"type":"string"},"timezone":{"type":"string"},"nextRunAt":{"nullable":true,"type":"string"},"lastRunAt":{"nullable":true,"type":"string"},"rootGroupId":{"nullable":true,"type":"string"},"conditions":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/schema0"}]},"createdAt":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"}},"required":["id","companyId","name","description","resourceType","status","workflowId","workflowKey","triggerCron","timezone","nextRunAt","lastRunAt","rootGroupId","conditions","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/automation-rules/{id}":{"get":{"tags":["Automation Rules"],"description":"One rule with its condition tree rebuilt — what the edit form loads. The list endpoint flattens the tree to a sentence for display; this returns the tree itself, in the shape the builder edits and sends back.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"resourceType":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","archived"]},"workflowId":{"type":"string"},"workflowKey":{"type":"string"},"triggerCron":{"type":"string"},"timezone":{"type":"string"},"nextRunAt":{"nullable":true,"type":"string"},"lastRunAt":{"nullable":true,"type":"string"},"rootGroupId":{"nullable":true,"type":"string"},"conditions":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/schema0"}]},"createdAt":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"}},"required":["id","companyId","name","description","resourceType","status","workflowId","workflowKey","triggerCron","timezone","nextRunAt","lastRunAt","rootGroupId","conditions","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"patch":{"tags":["Automation Rules"],"description":"Update an automation rule. Supplying `conditions` replaces the whole condition tree; omitting it leaves the tree untouched. Rules are not versioned, so an edit takes effect on the next scheduled run.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"nullable":true,"type":"string","maxLength":2000},"workflowId":{"type":"string","minLength":1},"workflowTemplateKey":{"type":"string","minLength":1},"stepConfigs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{}}},"triggerCron":{"type":"string","minLength":1,"pattern":"^(\\S+\\s+){4}\\S+$"},"timezone":{"type":"string","minLength":1},"status":{"type":"string","enum":["draft","active","paused","archived"]},"conditions":{"allOf":[{"$ref":"#/components/schemas/schema0Input"}]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"resourceType":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","archived"]},"workflowId":{"type":"string"},"workflowKey":{"type":"string"},"triggerCron":{"type":"string"},"timezone":{"type":"string"},"nextRunAt":{"nullable":true,"type":"string"},"lastRunAt":{"nullable":true,"type":"string"},"rootGroupId":{"nullable":true,"type":"string"},"conditions":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/schema0"}]},"createdAt":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"}},"required":["id","companyId","name","description","resourceType","status","workflowId","workflowKey","triggerCron","timezone","nextRunAt","lastRunAt","rootGroupId","conditions","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/automation-rules/draft":{"post":{"tags":["Natural languages to Automation Rules"],"description":"Transfer natural language to automation rule for user to verify instead of select rule from our catalog","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":2000}},"required":["text"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"nullable":true,"type":"string","maxLength":2000},"conditions":{"$ref":"#/components/schemas/schema0"},"triggerCron":{"nullable":true,"type":"string","minLength":1,"pattern":"^(\\S+\\s+){4}\\S+$"},"workflowTemplateKey":{"nullable":true,"type":"string","minLength":1},"warnings":{"type":"array","items":{"type":"string"}}},"required":["name","description","conditions","triggerCron","workflowTemplateKey","warnings"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/automation-rules/preview":{"post":{"tags":["Automation Rules"],"description":"Count what a condition tree matches before it belongs to a rule — what the create form calls while the author is still building it. Runs the same compiler and the same SQL as a scheduled run. No rule is written, but the company is enrolled for projection so the backfill that feeds later previews can start.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conditions":{"$ref":"#/components/schemas/schema0Input"},"resourceType":{"type":"string","minLength":1},"timezone":{"type":"string","minLength":1},"sampleSize":{"default":5,"type":"integer","minimum":0,"maximum":50},"sampleOffset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["conditions"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"matchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"columns":{"type":"array","items":{"type":"string"}},"rows":{"type":"array","items":{"type":"object","additionalProperties":{}}},"anchorDate":{"type":"string"},"projectionStatus":{"type":"string","enum":["backfilling","ready"]}},"required":["matchedCount","columns","rows","anchorDate","projectionStatus"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/automation-rules/{id}/preview":{"post":{"tags":["Automation Rules"],"description":"Count the order lines this rule matches right now. Runs the same compiler and the same SQL as a scheduled run, wrapped in COUNT(*) — nothing is written. Pass `conditions` to preview an unsaved edit; omit the body to preview the saved rule.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conditions":{"allOf":[{"$ref":"#/components/schemas/schema0Input"}]},"sampleSize":{"default":5,"type":"integer","minimum":0,"maximum":50},"sampleOffset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"matchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"columns":{"type":"array","items":{"type":"string"}},"rows":{"type":"array","items":{"type":"object","additionalProperties":{}}},"anchorDate":{"type":"string"},"projectionStatus":{"type":"string","enum":["backfilling","ready"]}},"required":["matchedCount","columns","rows","anchorDate","projectionStatus"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/automation-rules/{id}/run":{"post":{"tags":["Automation Rules"],"description":"Evaluate this rule now and queue an execution for every order line it matches. Runs the same matcher as the schedule and writes a run row, but does not consume or move the rule's next scheduled slot. Lines this rule already settled are not queued again.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"runId":{"nullable":true,"type":"string"},"ruleId":{"type":"string"},"status":{"type":"string","enum":["running","done","failed","skipped"]},"matchedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"anchorDate":{"nullable":true,"type":"string"}},"required":["runId","ruleId","status","matchedCount","anchorDate"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/permissions/me":{"get":{"tags":["Permissions"],"description":"Effective type-level permissions for the authenticated user (sidebar menus + action buttons).","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"permissions":{"type":"array","items":{"type":"string"}},"byResource":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["permissions","byResource"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/permissions/roles":{"get":{"tags":["Permissions"],"description":"List all roles (system + custom) in the tenant.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"isSystem":{"type":"boolean"}},"required":["id","key","name","description","isSystem"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}},"post":{"tags":["Permissions"],"description":"Create a custom role (optionally inheriting other roles).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"description":{"type":"string"},"inherits":{"type":"array","items":{"type":"string","minLength":1}}},"required":["key","name"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"isSystem":{"type":"boolean"}},"required":["id","key","name","description","isSystem"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/permissions/roles/{key}":{"get":{"tags":["Permissions"],"description":"Get a role and the permissions granted to it.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"key","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"role":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"isSystem":{"type":"boolean"}},"required":["id","key","name","description","isSystem"],"additionalProperties":false},"permissions":{"type":"array","items":{"type":"string"}}},"required":["role","permissions"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"delete":{"tags":["Permissions"],"description":"Delete a custom role (system roles cannot be deleted).","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"key","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/permissions/roles/{key}/permissions":{"post":{"tags":["Permissions"],"description":"Grant a permission to a role.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"permission":{"type":"string","pattern":"^[^:]+:(create|read|edit|delete|archive)$"},"name":{"type":"string"}},"required":["permission"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"key","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"delete":{"tags":["Permissions"],"description":"Revoke a permission from a role.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"permission":{"type":"string","pattern":"^[^:]+:(create|read|edit|delete|archive)$"}},"required":["permission"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"key","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"put":{"tags":["Permissions"],"description":"Replace a role's entire type-level permission set atomically (permission-set editor save).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"permissions":{"type":"array","items":{"type":"string","pattern":"^[^:]+:(create|read|edit|delete|archive)$"}}},"required":["permissions"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"key","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/permissions/roles/{key}/parents":{"post":{"tags":["Permissions"],"description":"Make a role inherit another role (childKey inherits parentKey).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"parentKey":{"type":"string","minLength":1}},"required":["parentKey"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"key","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/permissions/roles/{key}/members":{"get":{"tags":["Permissions"],"description":"List the actors (users) assigned to a role.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"key","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["user","service_account"]},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"post":{"tags":["Permissions"],"description":"Assign a role to an actor (user or service account).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actorType":{"default":"user","type":"string","enum":["user","service_account"]},"actorId":{"type":"string","minLength":1},"displayName":{"type":"string"}},"required":["actorId"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"key","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/permissions/roles/{key}/members/{actorType}/{actorId}":{"delete":{"tags":["Permissions"],"description":"Remove a role from an actor (user or service account).","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"key","required":true},{"schema":{"type":"string","enum":["user","service_account"]},"in":"path","name":"actorType","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"actorId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/permissions/users/{userId}/roles":{"get":{"tags":["Permissions"],"description":"List the roles assigned to a user.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"isSystem":{"type":"boolean"}},"required":["id","key","name","description","isSystem"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/permissions/catalog":{"get":{"tags":["Permissions"],"description":"List the permission catalog (optionally filtered by resource type).","parameters":[{"schema":{"type":"string"},"in":"query","name":"resourceType","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"key":{"type":"string"},"resourceType":{"type":"string"},"action":{"type":"string"},"name":{"nullable":true,"type":"string"}},"required":["id","tenantId","key","resourceType","action","name"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/permissions/catalog/blueprint":{"get":{"tags":["Permissions"],"description":"The permission blueprint: feature groups → resources (with supported actions) + templates. Drives the permission-set editor and the effective-access matrix.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"actions":{"type":"array","items":{"type":"string","enum":["create","read","edit","delete","archive"]}},"groups":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"resources":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"actions":{"type":"array","items":{"type":"string","enum":["create","read","edit","delete","archive"]}}},"required":["key","name","description","actions"],"additionalProperties":false}}},"required":["key","name","description","resources"],"additionalProperties":false}},"templates":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"actions":{"type":"array","items":{"type":"string","enum":["create","read","edit","delete","archive"]}}},"required":["key","name","description","actions"],"additionalProperties":false}}},"required":["actions","groups","templates"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/permissions/exceptions":{"post":{"tags":["Permissions"],"description":"Share (allow) or deny a specific record for a user. Deny wins; sharing a denied record is rejected.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"permission":{"type":"string","pattern":"^[^:]+:(create|read|edit|delete|archive)$"},"resourceType":{"type":"string","minLength":1},"resourceId":{"type":"string","minLength":1},"effect":{"type":"string","enum":["allow","deny"]}},"required":["userId","permission","resourceType","resourceId","effect"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"delete":{"tags":["Permissions"],"description":"Clear any per-record exception (share or deny) for a user + record.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"permission":{"type":"string","pattern":"^[^:]+:(create|read|edit|delete|archive)$"},"resourceType":{"type":"string","minLength":1},"resourceId":{"type":"string","minLength":1}},"required":["userId","permission","resourceType","resourceId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}},"get":{"tags":["Permissions"],"description":"List all per-record exceptions (shares + denies) on a record.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"resourceType","required":true},{"schema":{"type":"string","minLength":1},"in":"query","name":"resourceId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"actorType":{"type":"string","enum":["user","service_account"]},"actorId":{"type":"string"},"permission":{"type":"string"},"effect":{"type":"string","enum":["allow","deny"]}},"required":["actorType","actorId","permission","effect"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/permissions/users/{userId}/exceptions":{"get":{"tags":["Permissions"],"description":"List every per-record exception (share or deny) held by a user across all records in the tenant.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"permission":{"type":"string"},"resourceType":{"type":"string"},"resourceId":{"type":"string"},"effect":{"type":"string","enum":["allow","deny"]}},"required":["permission","resourceType","resourceId","effect"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/permissions/resources":{"get":{"tags":["Permissions"],"description":"List the resource types (dev/seed-defined; not user-creatable).","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"}},"required":["key","name","description"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/permissions/actors":{"get":{"tags":["Permissions"],"description":"List actors in the tenant with the roles they hold.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"actorType":{"type":"string","enum":["user","service_account"]},"actorId":{"type":"string"},"displayName":{"nullable":true,"type":"string"},"roleKeys":{"type":"array","items":{"type":"string"}}},"required":["actorType","actorId","displayName","roleKeys"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/permissions/service-accounts":{"get":{"tags":["Permissions"],"description":"List service accounts in the tenant.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"disabled":{"type":"boolean"}},"required":["id","name","disabled"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}},"post":{"tags":["Permissions"],"description":"Create a service account (no API key issued here).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"disabled":{"type":"boolean"}},"required":["id","name","disabled"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/permissions/service-accounts/api-key-usage":{"get":{"tags":["Permissions"],"description":"List the tenant's service-account API keys with their request count on a given day (defaults to today).","parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"date","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"apiKeyId":{"type":"string"},"serviceAccountId":{"type":"string"},"serviceAccountName":{"nullable":true,"type":"string"},"label":{"nullable":true,"type":"string"},"keyPrefix":{"nullable":true,"type":"string"},"removedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"limitPerMinute":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"lastUsedAt":{"nullable":true,"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"usageDate":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"requestCount":{"type":"number"}},"required":["apiKeyId","serviceAccountId","serviceAccountName","label","keyPrefix","removedAt","limitPerMinute","createdAt","lastUsedAt","usageDate","requestCount"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/order-lines/":{"get":{"tags":["Order Lines"],"description":"List order lines owned by the current company, paginated via `page`/`count`. Pass `orderId` to filter to a single order; omit it to list lines across all of the company’s orders. Supports multi-value CSV filters on the line style’s season and brand properties (`season`, `brand` — comma is reserved as the separator).","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"count","required":false},{"schema":{"type":"string"},"in":"query","name":"orderId","required":false},{"schema":{"type":"string","maxLength":2000},"in":"query","name":"season","required":false},{"schema":{"type":"string","maxLength":2000},"in":"query","name":"brand","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"isArchived","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"orderLineNumber":{"nullable":true,"type":"string"},"lineNo":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"styleId":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByImpersonateName":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"tracingReflectionOrderId":{"nullable":true,"type":"string"},"tracingOrderRequestedAt":{"nullable":true,"type":"string"},"styleProperties":{"type":"object","properties":{"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["seasons","brands"],"additionalProperties":false},"order":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"string"},"orderType":{"nullable":true,"type":"string"},"buyerCompanyId":{"nullable":true,"type":"string"},"supplierCompanyId":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"tracingStatus":{"nullable":true,"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"source":{"nullable":true,"type":"string"},"buyerFacilityProcess":{"nullable":true,"type":"string"},"supplierFacilityProcess":{"nullable":true,"type":"string"},"isArchived":{"type":"boolean"}},"required":["id","orderNumber","orderType","buyerCompanyId","supplierCompanyId","orderDate","updatedAt","updatedByUserName","tracingStatus","tags","source","buyerFacilityProcess","supplierFacilityProcess","isArchived"],"additionalProperties":false}},"required":["id","orderId","orderLineNumber","lineNo","styleId","quantity","unit","secondaryQuantity","secondaryUnit","createdAt","createdByUserId","createdByUserName","createdByCompanyId","createdByCompanyName","createdByImpersonateId","createdByImpersonateName","createdByApiKeyId","createdByApiKeyLabel","updatedAt","updatedByUserId","updatedByUserName","updatedByCompanyId","updatedByCompanyName","updatedByImpersonateId","updatedByImpersonateName","updatedByApiKeyId","updatedByApiKeyLabel","order"],"additionalProperties":false}}},"required":["meta","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/order-lines/{lineId}":{"get":{"tags":["Order Lines"],"description":"Fetch a single order line by its id. Returns 404 when the line or its parent order is not accessible to the current company.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"lineId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"orderLineNumber":{"nullable":true,"type":"string"},"lineNo":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"styleId":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"secondaryQuantity":{"nullable":true,"type":"number"},"secondaryUnit":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string"},"createdByUserId":{"nullable":true,"type":"string"},"createdByUserName":{"nullable":true,"type":"string"},"createdByCompanyId":{"nullable":true,"type":"string"},"createdByCompanyName":{"nullable":true,"type":"string"},"createdByImpersonateId":{"nullable":true,"type":"string"},"createdByImpersonateName":{"nullable":true,"type":"string"},"createdByApiKeyId":{"nullable":true,"type":"string"},"createdByApiKeyLabel":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"updatedByUserId":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"updatedByCompanyId":{"nullable":true,"type":"string"},"updatedByCompanyName":{"nullable":true,"type":"string"},"updatedByImpersonateId":{"nullable":true,"type":"string"},"updatedByImpersonateName":{"nullable":true,"type":"string"},"updatedByApiKeyId":{"nullable":true,"type":"string"},"updatedByApiKeyLabel":{"nullable":true,"type":"string"},"tracingReflectionOrderId":{"nullable":true,"type":"string"},"tracingOrderRequestedAt":{"nullable":true,"type":"string"},"styleProperties":{"type":"object","properties":{"seasons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"brands":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["seasons","brands"],"additionalProperties":false},"order":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"orderNumber":{"type":"string"},"orderType":{"nullable":true,"type":"string"},"buyerCompanyId":{"nullable":true,"type":"string"},"supplierCompanyId":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"updatedByUserName":{"nullable":true,"type":"string"},"tracingStatus":{"nullable":true,"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"source":{"nullable":true,"type":"string"},"buyerFacilityProcess":{"nullable":true,"type":"string"},"supplierFacilityProcess":{"nullable":true,"type":"string"},"isArchived":{"type":"boolean"}},"required":["id","orderNumber","orderType","buyerCompanyId","supplierCompanyId","orderDate","updatedAt","updatedByUserName","tracingStatus","tags","source","buyerFacilityProcess","supplierFacilityProcess","isArchived"],"additionalProperties":false}},"required":["id","orderId","orderLineNumber","lineNo","styleId","quantity","unit","secondaryQuantity","secondaryUnit","createdAt","createdByUserId","createdByUserName","createdByCompanyId","createdByCompanyName","createdByImpersonateId","createdByImpersonateName","createdByApiKeyId","createdByApiKeyLabel","updatedAt","updatedByUserId","updatedByUserName","updatedByCompanyId","updatedByCompanyName","updatedByImpersonateId","updatedByImpersonateName","updatedByApiKeyId","updatedByApiKeyLabel","order"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/order-documents/":{"get":{"tags":["Order Documents"],"description":"List documents attached to an order (produced by the Tracing workflow), paginated via `page`/`count`.","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"count","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"orderId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"documentType":{"nullable":true,"type":"string"},"documentTypeId":{"nullable":true,"type":"string"},"origin":{"type":"string","enum":["TRACING","ORDER_HUB","CMM"]},"orderLineId":{"nullable":true,"type":"string"},"fileId":{"nullable":true,"type":"string"},"fileUrl":{"nullable":true,"type":"string"},"fileContentType":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"createdAt":{"nullable":true,"type":"string"}},"required":["id","name","documentType","documentTypeId","origin","orderLineId","fileId","fileUrl","fileContentType","updatedAt","createdAt"],"additionalProperties":false}}},"required":["meta","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"post":{"tags":["Order Documents"],"description":"Attach uploaded files to an order as documents. Documents on lines already sent to tracing are linked to their tracing transactions immediately.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","minLength":1},"orderLineId":{"type":"string","minLength":1},"attachments":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"reference":{"type":"string"},"description":{"type":"string"}},"required":["fileId","type"]}}},"required":["orderId","attachments"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"orderId":{"type":"string"},"documentIds":{"type":"array","items":{"type":"string"}}},"required":["orderId","documentIds"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/integrations/amfori/sync/":{"post":{"tags":["Integrations - Amfori"],"description":"Manually trigger an amfori sync for the current company (\"Sync now\"). Returns the new syncHistoryId. Returns 409 when a sync is already running for the company.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"syncHistoryId":{"type":"string"}},"required":["syncHistoryId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/integrations/amfori/history/":{"get":{"tags":["Integrations - Amfori"],"description":"Brand-scoped, paginated list of the caller's past amfori sync runs, newest first.","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"pageSize","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"totalCount":{"type":"number"},"pageSize":{"type":"number"}},"required":["count","page","totalCount","pageSize"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"syncHistoryId":{"type":"string"},"trigger":{"type":"string","enum":["INITIAL","MANUAL","SCHEDULED"]},"status":{"type":"string","enum":["RUNNING","COMPLETED","PARTIAL","FAILED"]},"startedAt":{"type":"string"},"completedAt":{"nullable":true,"type":"string"},"durationMs":{"nullable":true,"type":"number"},"errorsCount":{"type":"number"},"warningsCount":{"type":"number"},"suppliersMatched":{"type":"number"},"suppliersUnmatched":{"type":"number"},"auditsCreated":{"type":"number"},"dataPointsWritten":{"type":"number"},"findingsCreated":{"type":"number"}},"required":["syncHistoryId","trigger","status","startedAt","completedAt","durationMs","errorsCount","warningsCount","suppliersMatched","suppliersUnmatched","auditsCreated","dataPointsWritten","findingsCreated"],"additionalProperties":false}}},"required":["meta","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/integrations/amfori/history/{syncHistoryId}":{"get":{"tags":["Integrations - Amfori"],"description":"Returns the full JSON report (header + counters + step-log entries) for a single amfori sync run. Brand-scoped: the caller must own the run or have an active company link to its owner.","parameters":[{"schema":{"type":"string"},"in":"path","name":"syncHistoryId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"header":{"type":"object","properties":{"syncHistoryId":{"type":"string"},"trigger":{"type":"string","enum":["INITIAL","MANUAL","SCHEDULED"]},"status":{"type":"string","enum":["RUNNING","COMPLETED","PARTIAL","FAILED"]},"syncDate":{"type":"string"},"startedAt":{"type":"string"},"completedAt":{"nullable":true,"type":"string"},"durationMs":{"nullable":true,"type":"number"},"lastError":{"nullable":true,"type":"object","properties":{"code":{"type":"string","enum":["AUTH_FAILED","CREDENTIALS_REVOKED","RATE_LIMITED","UPSTREAM_5XX","UNKNOWN"]},"message":{"type":"string"},"failedPhase":{"type":"string"},"httpStatus":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["code","message","failedPhase","httpStatus"],"additionalProperties":false}},"required":["syncHistoryId","trigger","status","syncDate","startedAt","completedAt","durationMs","lastError"],"additionalProperties":false},"counters":{"type":"object","properties":{"suppliersMatched":{"type":"number"},"suppliersUnmatched":{"type":"number"},"auditsCreated":{"type":"number"},"dataPointsWritten":{"type":"number"},"findingsCreated":{"type":"number"},"zeroToleranceCreated":{"type":"number"},"errorsCount":{"type":"number"}},"required":["suppliersMatched","suppliersUnmatched","auditsCreated","dataPointsWritten","findingsCreated","zeroToleranceCreated","errorsCount"],"additionalProperties":false},"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"status":{"type":"string","enum":["SUCCESS","WARNING","ERROR","SKIP"]},"phase":{"type":"string"},"message":{"type":"string"},"suggestedFix":{"nullable":true,"type":"string"},"context":{"nullable":true,"type":"object","additionalProperties":{}},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false}},"createdAt":{"type":"string"},"unlinked":{"type":"boolean"}},"required":["id","code","status","phase","message","suggestedFix","context","fields","createdAt"],"additionalProperties":false}}},"required":["header","counters","entries"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/integrations/amfori/history/{syncHistoryId}/report":{"get":{"tags":["Integrations - Amfori"],"description":"Streams a downloadable PDF report for a single amfori sync run. Brand-scoped: the caller must own the run or have an active company link to its owner.","parameters":[{"schema":{"type":"string"},"in":"path","name":"syncHistoryId","required":true}],"responses":{"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/user-companies/companies-to-switch":{"get":{"tags":["User Companies"],"description":"Every other company the authenticated user belongs to, for the account switcher — excludes the caller's current company.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"userId":{"type":"string"},"role":{"type":"string"},"isPrimary":{"type":"boolean"},"hasAgreedWithTerms":{"type":"boolean"},"hasAgreedWithTermsAt":{"nullable":true,"type":"string"},"userActivationLastNotifiedAt":{"nullable":true,"type":"string"},"name":{"type":"string"},"officialName":{"type":"string"},"isDemoCompany":{"type":"number"},"isClientCompany":{"type":"number"}},"required":["id","companyId","userId","role","isPrimary","hasAgreedWithTerms","hasAgreedWithTermsAt","userActivationLastNotifiedAt","name","officialName","isDemoCompany","isClientCompany"],"additionalProperties":false}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/user-companies/list-by-company-ids":{"get":{"tags":["User Companies"],"description":"Users belonging to any of the given companies. Unscoped — any authenticated caller may query any company's users. `notAdmin=true` additionally excludes Retraced-staff roles and projects `email`.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"companyIds","required":true},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"in":"query","name":"notAdmin","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"nullable":true,"type":"string"},"lastName":{"nullable":true,"type":"string"},"companyId":{"type":"string"},"isBlocked":{"type":"number"},"developmentTag":{"nullable":true,"type":"string"},"hasAgreedWithTerms":{"type":"boolean"},"emailPreferences":{"nullable":true},"email":{"type":"string"}},"required":["id","firstName","lastName","companyId","isBlocked","developmentTag","hasAgreedWithTerms","emailPreferences"],"additionalProperties":false}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/user-preferences/get-by-user-email-sha-unauthorized":{"get":{"tags":["Users"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"email","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"preferences":{"type":"object","additionalProperties":{}}},"required":["id","preferences"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/user-preferences/{id}/patch-preferences-unauthorized":{"patch":{"tags":["Users","Preferences"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["notifEmail","notifAdminEmail","filterCompaniesList","filterProductsList","onboardColumnCompaniesList","onboardColumnProductsList","savedTablePreferences","userLanguage","savedAnalyticsFilterPreferences"]},"value":{"anyOf":[{"type":"object","properties":{"realtime":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"daily":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"weekly":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]}},"required":["realtime","daily"]},{"type":"object","properties":{"language":{"type":"string","minLength":1,"maxLength":3}},"required":["language"]},{"type":"array","items":{"type":"object","properties":{"table":{"type":"string"},"rowsPerPage":{"type":"number"},"columnReordering":{"nullable":true,"type":"array","items":{"type":"object","properties":{"column":{"type":"string","minLength":1},"show":{"type":"boolean"},"width":{"type":"number","minimum":0}},"required":["column","show","width"]}},"filter":{"nullable":true,"type":"object","additionalProperties":{}}},"required":["rowsPerPage"]}},{"type":"object","properties":{"duplicate_company":{"type":"boolean"},"user_created":{"type":"boolean"},"claim_ready_for_review":{"type":"boolean"},"shopify_customer_data_request":{"type":"boolean"},"shopify_customer_redact_request":{"type":"boolean"},"shopify_shop_redact_request":{"type":"boolean"},"user_login_blocked":{"type":"boolean"}},"required":["duplicate_company","user_created","claim_ready_for_review","shopify_customer_data_request","shopify_customer_redact_request","shopify_shop_redact_request","user_login_blocked"]},{"type":"array","items":{"type":"object","properties":{"report":{"type":"string"},"filter":{"nullable":true,"type":"object","additionalProperties":{}}},"required":["report"]}}]}},"required":["key","value"]}}}}},"parameters":[{"schema":{"type":"string"},"in":"query","name":"email","required":false},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"description":"True when the request succeeded.","type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/user-preferences/me":{"patch":{"summary":"Patch the authenticated user's own preferences","tags":["Users","Preferences"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["notifEmail","notifAdminEmail","filterCompaniesList","filterProductsList","onboardColumnCompaniesList","onboardColumnProductsList","savedTablePreferences","userLanguage","savedAnalyticsFilterPreferences"]},"value":{"anyOf":[{"type":"object","properties":{"realtime":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"daily":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"weekly":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]}},"required":["realtime","daily"]},{"type":"object","properties":{"language":{"type":"string","minLength":1,"maxLength":3}},"required":["language"]},{"type":"array","items":{"type":"object","properties":{"table":{"type":"string"},"rowsPerPage":{"type":"number"},"columnReordering":{"nullable":true,"type":"array","items":{"type":"object","properties":{"column":{"type":"string","minLength":1},"show":{"type":"boolean"},"width":{"type":"number","minimum":0}},"required":["column","show","width"]}},"filter":{"nullable":true,"type":"object","additionalProperties":{}}},"required":["rowsPerPage"]}},{"type":"object","properties":{"duplicate_company":{"type":"boolean"},"user_created":{"type":"boolean"},"claim_ready_for_review":{"type":"boolean"},"shopify_customer_data_request":{"type":"boolean"},"shopify_customer_redact_request":{"type":"boolean"},"shopify_shop_redact_request":{"type":"boolean"},"user_login_blocked":{"type":"boolean"}},"required":["duplicate_company","user_created","claim_ready_for_review","shopify_customer_data_request","shopify_customer_redact_request","shopify_shop_redact_request","user_login_blocked"]},{"type":"array","items":{"type":"object","properties":{"report":{"type":"string"},"filter":{"nullable":true,"type":"object","additionalProperties":{}}},"required":["report"]}}]}},"required":["key","value"]}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}}}},"get":{"summary":"Get the authenticated user's own preferences","tags":["Users","Preferences"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"keys","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}}}}},"/api/users/accept-terms":{"patch":{"tags":["Terms and Conditions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hasAgreedWithTerms":{"type":"boolean"}},"required":["hasAgreedWithTerms"]}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/users":{"post":{"summary":"Create a user in a company","tags":["Users"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"nullable":true,"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"companyId":{"type":"string","minLength":1},"firstName":{"type":"string","minLength":1,"maxLength":255,"pattern":"^\\S.*"},"lastName":{"nullable":true,"type":"string"}},"required":["companyId","firstName"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"nullable":true,"type":"string"},"lastName":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"primaryCompanyId":{"nullable":true,"type":"string"},"primaryRole":{"nullable":true,"type":"string"},"langId":{"nullable":true,"type":"string"},"isBlocked":{"nullable":true,"type":"number"},"intercomHash":{"nullable":true,"type":"string"},"emailSha256":{"nullable":true,"type":"string"},"avatarFileUrl":{"nullable":true,"type":"string"},"originalAvatarFileUrl":{"nullable":true,"type":"string"}},"required":["id","firstName","lastName","email","primaryCompanyId","primaryRole","langId","isBlocked","intercomHash","emailSha256","avatarFileUrl","originalAvatarFileUrl"],"additionalProperties":{}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/users/{employeeId}":{"delete":{"summary":"Delete an employee's account (company owner only)","tags":["Profile"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"employeeId","required":true}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/users/me":{"delete":{"summary":"Delete the authenticated user's own account","tags":["Profile"],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null],"description":"No content"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":false,"type":"boolean"}},"required":["success"],"additionalProperties":false},"statusCode":{"type":"number","description":"HTTP status code of the error."},"code":{"type":"string","description":"Stable, machine-readable error code — branch your error handling on this rather than the message."},"error":{"type":"string"},"message":{"type":"string","description":"Human-readable error message. May change; do not parse it."},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"get":{"summary":"Get the authenticated user's own profile","tags":["Profile"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"nullable":true,"type":"string"},"lastName":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"primaryCompanyId":{"nullable":true,"type":"string"},"primaryRole":{"nullable":true,"type":"string"},"role":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"type":"string"},"name":{"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"transliteratedOfficialName":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"country":{"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"facilityProcesses":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","additionalProperties":{}}},"workosOrganizationId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"shopId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"type":"number"},"isClientCompany":{"nullable":true,"type":"number"},"enabledFeatures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"}},"required":["id","name","description"],"additionalProperties":false}},"facilityProcessNames":{"type":"string"}},"required":["id","officialName","name","country","enabledFeatures","facilityProcessNames"],"additionalProperties":{}},"appFeatures":{"type":"array","items":{}},"preferences":{"type":"object","additionalProperties":{}},"enabledDevelopmentTags":{"type":"array","items":{"type":"object","properties":{"featureId":{"type":"string"},"tag":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"isEnabled":{"type":"number"}},"required":["featureId","tag","name","description","isEnabled"],"additionalProperties":false}},"unImpersonatedUser":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"}},"additionalProperties":{}}},"required":["id","firstName","lastName","email","primaryCompanyId","primaryRole","role","companyId","company","appFeatures","preferences","enabledDevelopmentTags","unImpersonatedUser"],"additionalProperties":{}}}}}}},"put":{"summary":"Update the authenticated user's own profile","tags":["Profile"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":255,"pattern":"^\\S.*"},"lastName":{"nullable":true,"type":"string","minLength":1},"langId":{"type":"string","enum":["en","es","de","fr"]},"isBlocked":{"nullable":true,"type":"boolean"},"companyId":{"nullable":true,"type":"string","minLength":1}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"nullable":true,"type":"string"},"lastName":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"primaryCompanyId":{"nullable":true,"type":"string"},"primaryRole":{"nullable":true,"type":"string"},"role":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"type":"string"},"name":{"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"transliteratedOfficialName":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"country":{"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"facilityProcesses":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","additionalProperties":{}}},"workosOrganizationId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"shopId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"type":"number"},"isClientCompany":{"nullable":true,"type":"number"},"enabledFeatures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"}},"required":["id","name","description"],"additionalProperties":false}},"facilityProcessNames":{"type":"string"}},"required":["id","officialName","name","country","enabledFeatures","facilityProcessNames"],"additionalProperties":{}},"appFeatures":{"type":"array","items":{}},"preferences":{"type":"object","additionalProperties":{}},"enabledDevelopmentTags":{"type":"array","items":{"type":"object","properties":{"featureId":{"type":"string"},"tag":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"isEnabled":{"type":"number"}},"required":["featureId","tag","name","description","isEnabled"],"additionalProperties":false}}},"required":["id","firstName","lastName","email","primaryCompanyId","primaryRole","role","companyId","company","appFeatures","preferences","enabledDevelopmentTags"],"additionalProperties":{}}}}}}}},"/api/users/{id}":{"get":{"tags":["Users"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"nullable":true,"type":"string"},"lastName":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"primaryCompanyId":{"nullable":true,"type":"string"},"primaryRole":{"nullable":true,"type":"string"},"role":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"type":"string"},"name":{"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"transliteratedOfficialName":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"country":{"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"facilityProcesses":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","additionalProperties":{}}},"workosOrganizationId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"shopId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"type":"number"},"isClientCompany":{"nullable":true,"type":"number"},"enabledFeatures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"}},"required":["id","name","description"],"additionalProperties":false}},"facilityProcessNames":{"type":"string"}},"required":["id","officialName","name","country","enabledFeatures","facilityProcessNames"],"additionalProperties":{}},"appFeatures":{"type":"array","items":{}},"preferences":{"type":"object","additionalProperties":{}},"enabledDevelopmentTags":{"type":"array","items":{"type":"object","properties":{"featureId":{"type":"string"},"tag":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"isEnabled":{"type":"number"}},"required":["featureId","tag","name","description","isEnabled"],"additionalProperties":false}}},"required":["id","firstName","lastName","email","primaryCompanyId","primaryRole","role","companyId","company","appFeatures","preferences","enabledDevelopmentTags"],"additionalProperties":{}}}}}}},"put":{"tags":["Users"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":255,"pattern":"^\\S.*"},"lastName":{"nullable":true,"type":"string","minLength":1},"langId":{"type":"string","enum":["en","es","de","fr"]},"isBlocked":{"nullable":true,"type":"boolean"},"companyId":{"nullable":true,"type":"string","minLength":1}}}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"nullable":true,"type":"string"},"lastName":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"primaryCompanyId":{"nullable":true,"type":"string"},"primaryRole":{"nullable":true,"type":"string"},"role":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"officialName":{"type":"string"},"name":{"type":"string"},"transliteratedName":{"nullable":true,"type":"string"},"transliteratedOfficialName":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"country":{"type":"string"},"countryName":{"nullable":true,"type":"string"},"county":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"zipCode":{"nullable":true,"type":"string"},"addressLine1":{"nullable":true,"type":"string"},"addressLine2":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"companySize":{"nullable":true,"type":"string"},"companyType":{"nullable":true,"type":"string"},"featuredImageFileId":{"nullable":true,"type":"string"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"videoFileId":{"nullable":true,"type":"string"},"videoFileUrl":{"nullable":true,"type":"string"},"originalVideoFileUrl":{"nullable":true,"type":"string"},"numOfPermanentEmployees":{"nullable":true,"type":"number"},"numOfMaleEmployees":{"nullable":true,"type":"number"},"numOfFemaleEmployees":{"nullable":true,"type":"number"},"facilityProcesses":{"nullable":true,"type":"string"},"geojson":{"nullable":true,"type":"string"},"imageList":{"nullable":true,"type":"array","items":{"type":"object","additionalProperties":{}}},"workosOrganizationId":{"nullable":true,"type":"string"},"higgId":{"nullable":true,"type":"string"},"globalLocationNumber":{"nullable":true,"type":"string"},"vatId":{"nullable":true,"type":"string"},"dunsNumber":{"nullable":true,"type":"string"},"commercialRegisterNumber":{"nullable":true,"type":"string"},"osHubId":{"nullable":true,"type":"string"},"annualProductionCapacity":{"nullable":true,"type":"number"},"annualProductionCapacityUnit":{"nullable":true,"type":"string"},"minimumOrderQuantity":{"nullable":true,"type":"number"},"minimumOrderQuantityPerStyle":{"nullable":true,"type":"number"},"standardLeadTime":{"nullable":true,"type":"number"},"shopId":{"nullable":true,"type":"string"},"isDemoCompany":{"nullable":true,"type":"number"},"isClientCompany":{"nullable":true,"type":"number"},"enabledFeatures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"}},"required":["id","name","description"],"additionalProperties":false}},"facilityProcessNames":{"type":"string"}},"required":["id","officialName","name","country","enabledFeatures","facilityProcessNames"],"additionalProperties":{}},"appFeatures":{"type":"array","items":{}},"preferences":{"type":"object","additionalProperties":{}},"enabledDevelopmentTags":{"type":"array","items":{"type":"object","properties":{"featureId":{"type":"string"},"tag":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"isEnabled":{"type":"number"}},"required":["featureId","tag","name","description","isEnabled"],"additionalProperties":false}}},"required":["id","firstName","lastName","email","primaryCompanyId","primaryRole","role","companyId","company","appFeatures","preferences","enabledDevelopmentTags"],"additionalProperties":{}}}}}}}},"/api/users/":{"get":{"summary":"List a company's users, scoped to the caller's network","tags":["Users"],"description":"Paginated, filterable, sortable list of users joined with `user_companies`, restricted to companies reachable from the caller via `companies_service_company_links`. `isDropDown=true` returns an unpaginated, narrower-column variant for select inputs.","parameters":[{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":15,"type":"integer","minimum":0,"maximum":500},"in":"query","name":"count","required":false},{"schema":{"type":"string","pattern":"^[a-zA-Z]+:(ASC|DESC|asc|desc)$"},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":255},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"type":"string"},"in":"query","name":"companyId","required":false},{"schema":{"type":"string"},"in":"query","name":"role","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"in":"query","name":"selectCoWorkers","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"in":"query","name":"isDropDown","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"nullable":true,"type":"string"},"lastName":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"role":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"}},"required":["id"],"additionalProperties":{}}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","pageSize","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api-service/v3/webshop/{lang}/products/{id}":{"get":{"tags":["Webshop"],"description":"Returns the latest journey of the given product ID.","parameters":[{"schema":{"type":"string","minLength":2,"maxLength":2},"in":"path","name":"lang","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebshopJourneyResponseSchema"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}}}}},"/api-service/v3/webshop/{lang}/cards":{"get":{"tags":["Webshop"],"description":"Returns just the information required to show an item in a web-shop: Existence boolean and three tags.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"sku","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"productExtendedIdentifier","required":false},{"schema":{"type":"string","minLength":1,"pattern":"^[^:]+:.+$"},"in":"query","name":"clientIdentifier","required":false},{"schema":{"type":"string","minLength":2,"maxLength":2},"in":"path","name":"lang","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"isSKUMatched":{"type":"boolean"},"isProductMatched":{"type":"boolean"},"id":{"type":"string"},"productId":{"type":"string"},"styleId":{"type":"string"},"brandId":{"nullable":true,"type":"string"},"idx":{"type":"number"},"color":{"nullable":true,"type":"string"},"colorImageId":{"nullable":true,"type":"string"},"colorImageUrl":{"nullable":true,"type":"string"},"originalColorImageUrl":{"nullable":true,"type":"string"},"otherAttributes":{"nullable":true,"type":"string"},"sku":{"nullable":true,"type":"string"},"badges":{"type":"array","items":{"type":"object","properties":{"badge":{"type":"object","properties":{"id":{"type":"string"},"category":{"nullable":true,"type":"string"},"standardId":{"nullable":true,"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"descriptionDe":{"nullable":true,"type":"string"},"descriptionEs":{"nullable":true,"type":"string"},"descriptionFr":{"nullable":true,"type":"string"},"nameDe":{"nullable":true,"type":"string"},"nameEs":{"nullable":true,"type":"string"},"nameFr":{"nullable":true,"type":"string"},"imageFileUrl":{"nullable":true,"type":"string"},"originalImageFileUrl":{"nullable":true,"type":"string"},"translations":{"type":"object","additionalProperties":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false}}},"required":["id","name"],"additionalProperties":false},"proofs":{"nullable":true}},"required":["badge"],"additionalProperties":false}}},"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}}}}},"/api-service/v3/webshop/{lang}/icons":{"get":{"tags":["Webshop"],"description":"Returns just the information required to show an item in a web-shop: Existence boolean and three tags.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"sku","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"productExtendedIdentifier","required":false},{"schema":{"type":"string","minLength":1,"pattern":"^[^:]+:.+$"},"in":"query","name":"clientIdentifier","required":false},{"schema":{"type":"string","minLength":2,"maxLength":2},"in":"path","name":"lang","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"isSKUMatched":{"type":"boolean"},"isProductMatched":{"type":"boolean"},"id":{"type":"string"},"productId":{"type":"string"},"styleId":{"type":"string"},"brandId":{"nullable":true,"type":"string"},"idx":{"type":"number"},"color":{"nullable":true,"type":"string"},"colorImageId":{"nullable":true,"type":"string"},"colorImageUrl":{"nullable":true,"type":"string"},"originalColorImageUrl":{"nullable":true,"type":"string"},"otherAttributes":{"nullable":true,"type":"string"},"sku":{"nullable":true,"type":"string"},"badges":{"type":"array","items":{"type":"object","properties":{"badge":{"type":"object","properties":{"id":{"type":"string"},"category":{"nullable":true,"type":"string"},"standardId":{"nullable":true,"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"descriptionDe":{"nullable":true,"type":"string"},"descriptionEs":{"nullable":true,"type":"string"},"descriptionFr":{"nullable":true,"type":"string"},"nameDe":{"nullable":true,"type":"string"},"nameEs":{"nullable":true,"type":"string"},"nameFr":{"nullable":true,"type":"string"},"imageFileUrl":{"nullable":true,"type":"string"},"originalImageFileUrl":{"nullable":true,"type":"string"},"translations":{"type":"object","additionalProperties":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false}}},"required":["id","name"],"additionalProperties":false},"proofs":{"nullable":true}},"required":["badge"],"additionalProperties":false}}},"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}}}}},"/api-service/v3/webshop/{lang}/icons-with-description":{"get":{"tags":["Webshop"],"description":"Returns just the information required to show an item in a web-shop: Existence boolean and three tags.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"sku","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"productExtendedIdentifier","required":false},{"schema":{"type":"string","minLength":1,"pattern":"^[^:]+:.+$"},"in":"query","name":"clientIdentifier","required":false},{"schema":{"type":"string","minLength":2,"maxLength":2},"in":"path","name":"lang","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"isSKUMatched":{"type":"boolean"},"isProductMatched":{"type":"boolean"},"id":{"type":"string"},"productId":{"type":"string"},"styleId":{"type":"string"},"brandId":{"nullable":true,"type":"string"},"idx":{"type":"number"},"color":{"nullable":true,"type":"string"},"colorImageId":{"nullable":true,"type":"string"},"colorImageUrl":{"nullable":true,"type":"string"},"originalColorImageUrl":{"nullable":true,"type":"string"},"otherAttributes":{"nullable":true,"type":"string"},"sku":{"nullable":true,"type":"string"},"badges":{"type":"array","items":{"type":"object","properties":{"badge":{"type":"object","properties":{"id":{"type":"string"},"category":{"nullable":true,"type":"string"},"standardId":{"nullable":true,"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"descriptionDe":{"nullable":true,"type":"string"},"descriptionEs":{"nullable":true,"type":"string"},"descriptionFr":{"nullable":true,"type":"string"},"nameDe":{"nullable":true,"type":"string"},"nameEs":{"nullable":true,"type":"string"},"nameFr":{"nullable":true,"type":"string"},"imageFileUrl":{"nullable":true,"type":"string"},"originalImageFileUrl":{"nullable":true,"type":"string"},"translations":{"type":"object","additionalProperties":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false}}},"required":["id","name"],"additionalProperties":false},"proofs":{"nullable":true}},"required":["badge"],"additionalProperties":false}}},"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}}}}},"/api-service/v3/webshop/{lang}/claim/{id}":{"get":{"tags":["Webshop"],"description":"Returns a claim with standard/certification details.","parameters":[{"schema":{"type":"string","minLength":2,"maxLength":2},"in":"path","name":"lang","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"companyName":{"nullable":true,"type":"string"},"standardId":{"nullable":true,"type":"string"},"explanation":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"expirationDate":{"nullable":true,"type":"string","format":"date-time"},"issueDate":{"nullable":true,"type":"string","format":"date-time"},"issuedBy":{"nullable":true,"type":"string"},"fileUrl":{"nullable":true,"type":"string"},"originalFileUrl":{"nullable":true,"type":"string"},"fileType":{"nullable":true,"type":"string"},"documentNumber":{"nullable":true,"type":"string"},"licenseNumber":{"nullable":true,"type":"string"},"livingWage":{"nullable":true,"type":"number"},"minimumWage":{"nullable":true,"type":"number"},"featuredImageFileUrl":{"nullable":true,"type":"string"},"originalFeaturedImageFileUrl":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"logoFileUrl":{"nullable":true,"type":"string"},"originalLogoFileUrl":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"}},"required":["id","companyId"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}}}}},"/api-service/v3/webshop/{lang}/button-transparency-report":{"get":{"tags":["Webshop"],"description":"Returns just the information required to show an item in a web-shop: Existence boolean and Supply Chain Transparency badge only.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"sku","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"productExtendedIdentifier","required":false},{"schema":{"type":"string","minLength":1,"pattern":"^[^:]+:.+$"},"in":"query","name":"clientIdentifier","required":false},{"schema":{"type":"string","minLength":2,"maxLength":2},"in":"path","name":"lang","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"isSKUMatched":{"type":"boolean"},"isProductMatched":{"type":"boolean"},"id":{"type":"string"},"productId":{"type":"string"},"styleId":{"type":"string"},"brandId":{"nullable":true,"type":"string"},"idx":{"type":"number"},"color":{"nullable":true,"type":"string"},"colorImageId":{"nullable":true,"type":"string"},"colorImageUrl":{"nullable":true,"type":"string"},"originalColorImageUrl":{"nullable":true,"type":"string"},"otherAttributes":{"nullable":true,"type":"string"},"sku":{"nullable":true,"type":"string"},"badges":{"type":"array","items":{"type":"object","properties":{"badge":{"type":"object","properties":{"id":{"type":"string"},"category":{"nullable":true,"type":"string"},"standardId":{"nullable":true,"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"descriptionDe":{"nullable":true,"type":"string"},"descriptionEs":{"nullable":true,"type":"string"},"descriptionFr":{"nullable":true,"type":"string"},"nameDe":{"nullable":true,"type":"string"},"nameEs":{"nullable":true,"type":"string"},"nameFr":{"nullable":true,"type":"string"},"imageFileUrl":{"nullable":true,"type":"string"},"originalImageFileUrl":{"nullable":true,"type":"string"},"translations":{"type":"object","additionalProperties":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false}}},"required":["id","name"],"additionalProperties":false},"proofs":{"nullable":true}},"required":["badge"],"additionalProperties":false}}},"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}}}}},"/api-service/v3/webshop/{lang}/button-verified":{"get":{"tags":["Webshop"],"description":"Returns just the information required to show an item in a web-shop: Existence boolean and three tags.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"sku","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"productExtendedIdentifier","required":false},{"schema":{"type":"string","minLength":1,"pattern":"^[^:]+:.+$"},"in":"query","name":"clientIdentifier","required":false},{"schema":{"type":"string","minLength":2,"maxLength":2},"in":"path","name":"lang","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"isSKUMatched":{"type":"boolean"},"isProductMatched":{"type":"boolean"},"id":{"type":"string"},"productId":{"type":"string"},"styleId":{"type":"string"},"brandId":{"nullable":true,"type":"string"},"idx":{"type":"number"},"color":{"nullable":true,"type":"string"},"colorImageId":{"nullable":true,"type":"string"},"colorImageUrl":{"nullable":true,"type":"string"},"originalColorImageUrl":{"nullable":true,"type":"string"},"otherAttributes":{"nullable":true,"type":"string"},"sku":{"nullable":true,"type":"string"},"badges":{"type":"array","items":{"type":"object","properties":{"badge":{"type":"object","properties":{"id":{"type":"string"},"category":{"nullable":true,"type":"string"},"standardId":{"nullable":true,"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"descriptionDe":{"nullable":true,"type":"string"},"descriptionEs":{"nullable":true,"type":"string"},"descriptionFr":{"nullable":true,"type":"string"},"nameDe":{"nullable":true,"type":"string"},"nameEs":{"nullable":true,"type":"string"},"nameFr":{"nullable":true,"type":"string"},"imageFileUrl":{"nullable":true,"type":"string"},"originalImageFileUrl":{"nullable":true,"type":"string"},"translations":{"type":"object","additionalProperties":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false}}},"required":["id","name"],"additionalProperties":false},"proofs":{"nullable":true}},"required":["badge"],"additionalProperties":false}}},"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"error":{"type":"string"},"message":{"type":"string"},"code":{"nullable":true,"type":"string"},"semanticCode":{"nullable":true,"type":"string"}},"required":["statusCode","error","message"],"additionalProperties":false}}}}}}},"/api-service/v3/webshop/{lang}/company-certificates/{id}":{"get":{"tags":["Webshop","Map"],"description":"Returns approved certificates and memberships of a company.","parameters":[{"schema":{"default":1,"type":"number"},"in":"query","name":"page","required":false},{"schema":{"default":25,"type":"number"},"in":"query","name":"count","required":false},{"schema":{"type":"string"},"in":"query","name":"sort","required":false},{"schema":{"type":"string"},"in":"query","name":"q","required":false},{"schema":{"type":"string"},"in":"query","name":"filter","required":false},{"schema":{"type":"boolean"},"in":"query","name":"isDropDown","required":false},{"schema":{"type":"string","minLength":2,"maxLength":2},"in":"path","name":"lang","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"standardId":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"explanation":{"nullable":true,"type":"string"},"fileUrl":{"nullable":true,"type":"string"},"companyId":{"nullable":true,"type":"string"},"updatedAt":{"nullable":true,"type":"string"},"licenseNumber":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"logoFileUrl":{"nullable":true,"type":"string"},"originalLogoFileUrl":{"nullable":true,"type":"string"},"translations":{"type":"object","additionalProperties":{"type":"object","properties":{"name":{"type":"string"},"description":{"nullable":true,"type":"string"}},"additionalProperties":false}}},"required":["id","standardId","status","explanation","fileUrl","companyId","updatedAt","licenseNumber","name","description","logoFileUrl","originalLogoFileUrl"],"additionalProperties":false}},"meta":{"type":"object","properties":{"count":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"totalCount":{"type":"number"}},"required":["count","page","pageSize","totalCount"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","error","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","error","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}},"required":["statusCode","code","error","message"],"additionalProperties":false}}}}}}}},"servers":[]}