{"openapi":"3.0.3","info":{"title":"Public API Reference","description":"The retraced API comprises all publicly enabled options to make\nmachine-to-machine changes in the retraced platform. The retraced dashboard uses the\nsame endpoints, but also in addition more. If you wish to use the API of the dashboard,\nit is possible but not versioned cleanly like the public API.\n\n## Authentication\n\nThe authentication procedure is passwordless and uses an API key in the header. To get\nan API key log into the Retraced Platform and navigate to **Developers HQ > API Keys**\nthen click **Create**. Be sure to copy the key somewhere safe, as you won't be able to\nview it again. If you don't see Developers HQ in the sidebar contact your Customer\nSuccess Manager to enable this for you. You can now set the key directly in request\nheaders. To authenticate using an API key, set the header key `companyapikey` to the\nvalue of your API key.\n\n## Getting Started\n\nRetraced has 2 environments against which you can send your requests and receive the\nexpected response: staging (for development and testing) and production. Your API key\nis scoped for both environments. The staging Base URL is\nhttps://publicapi.staging.retraced.com. Staging copies production data once daily, and\nall changes made on staging will be deleted.\n\nFind detailed guides on how to use the endpoints and how we recommend building an\nintegration given your use case in our\n[guides](https://publicapi.retraced.com/api/v2/guides). A history of public API\nchanges is available in the\n[release notes](https://publicapi.retraced.com/api/v2/release-notes).","version":"2.938.1"},"components":{"schemas":{"StyleSchemaInput":{"type":"object","properties":{"id":{"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.","type":"string","minLength":1},"forCompanyId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"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.","type":"string","minLength":1},"codeValue":{"description":"The unique code value for this identifier, e.g. \"ERP-001234\".","type":"string","minLength":1}},"required":["codeId","codeValue"]}},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"styleLevelId":{"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.","type":"string","minLength":1},"styleTypeId":{"type":"string","minLength":1},"productLevel":{"anyOf":[{"type":"string"},{"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"}]},"claimIntentions":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"customProperties":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"bucketName":{"type":"string"},"name":{"type":"string"},"fileSize":{"anyOf":[{"type":"number"},{"type":"null"}]},"contentType":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{},{"type":"null"}]},"updatedAt":{"anyOf":[{},{"type":"null"}]},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","url","previewUrl","fileType","bucketName","name","fileSize","contentType","fileHash","createdAt","updatedAt"]}},"isComponent":{"anyOf":[{"type":"boolean"},{"type":"number"}]},"isStoryActive":{"anyOf":[{"type":"boolean"},{"type":"number"}]},"isArchived":{"description":"True if the product has been archived. Archived products are excluded from default API results.","type":"boolean"},"qrCodeUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"description":"ISO 8601 UTC timestamp of when the record was created.","anyOf":[{},{"type":"null"}]},"updatedAt":{"description":"ISO 8601 UTC timestamp of when the record was last modified. Use with updatedAfterUnixMs for incremental sync.","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"}]},"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":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityCanBeSorted":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityCanCollectAtScale":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityIndustrialScale":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityRate":{"anyOf":[{"type":"number"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"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"]},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantityUnits":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"weightUnits":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"isWeightAvailable":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"assetId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assetType":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"hierarchyLevel":{"anyOf":[{"type":"number"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantityUnits":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"weightUnits":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"isWeightAvailable":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"assetId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assetType":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"hierarchyLevel":{"anyOf":[{"type":"number"},{"type":"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"]},"StyleSchema":{"type":"object","properties":{"id":{"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.","type":"string","minLength":1},"forCompanyId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"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.","type":"string","minLength":1},"codeValue":{"description":"The unique code value for this identifier, e.g. \"ERP-001234\".","type":"string","minLength":1}},"required":["codeId","codeValue"],"additionalProperties":false}},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"styleLevelId":{"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.","type":"string","minLength":1},"styleTypeId":{"type":"string","minLength":1},"productLevel":{"anyOf":[{"type":"string"},{"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"}]},"claimIntentions":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"customProperties":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"bucketName":{"type":"string"},"name":{"type":"string"},"fileSize":{"anyOf":[{"type":"number"},{"type":"null"}]},"contentType":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","url","previewUrl","fileType","bucketName","name","fileSize","contentType","fileHash","createdAt","updatedAt"],"additionalProperties":false}},"isComponent":{"anyOf":[{"type":"boolean"},{"type":"number"}]},"isStoryActive":{"anyOf":[{"type":"boolean"},{"type":"number"}]},"isArchived":{"description":"True if the product has been archived. Archived products are excluded from default API results.","type":"boolean"},"qrCodeUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"description":"ISO 8601 UTC timestamp of when the record was created.","anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"description":"ISO 8601 UTC timestamp of when the record was last modified. Use with updatedAfterUnixMs for incremental sync.","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"}]},"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":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityCanBeSorted":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityCanCollectAtScale":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityIndustrialScale":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityRate":{"anyOf":[{"type":"number"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"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},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantityUnits":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"weightUnits":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"isWeightAvailable":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"assetId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assetType":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"hierarchyLevel":{"anyOf":[{"type":"number"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantityUnits":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"weightUnits":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"isWeightAvailable":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"assetId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assetType":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"hierarchyLevel":{"anyOf":[{"type":"number"},{"type":"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}}},"paths":{"/api/v2/styles/":{"post":{"tags":["Product / Styles"],"description":"Create a style, variant, or SKU. Omit parentId to create a top-level style. Set parentId to a style ID to create a variant, or to a variant ID to create a SKU. styleTypeId and isComponent are required when creating a top-level style.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Display name for the product, e.g. 'Summer Blazer'.","type":"string","minLength":1,"maxLength":255},"parentId":{"description":"Omit to create a top-level style. Set to a style ID to create a variant, or to a variant ID to create a SKU.","type":"string","minLength":1},"forCompanyId":{"description":"Create this style on behalf of another company in your network.","type":"string"},"codes":{"minItems":1,"type":"array","items":{"type":"object","properties":{"codeId":{"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.","type":"string","minLength":1},"codeValue":{"description":"The unique code value for this identifier, e.g. \"ERP-001234\".","type":"string","minLength":1}},"required":["codeId","codeValue"]}},"description":{"description":"Free-text product description. Nullable. Max 4000 characters.","anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"gender":{"description":"Product gender classification. Known values: MALE, FEMALE, UNISEX. Nullable.","anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"styleTypeId":{"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/. Required when creating a top-level style (no parentId).","type":"string","minLength":1},"color":{"description":"Color name for a variant, e.g. 'Navy Blue'. Only applicable when parentId points to a style.","type":"string","minLength":1,"maxLength":255},"dimension":{"description":"Size or dimension for a SKU, e.g. 'M' or '38'. Only applicable when parentId points to a variant.","type":"string","minLength":1,"maxLength":255},"isComponent":{"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. Required when creating a top-level style.","type":"boolean"},"isStoryActive":{"description":"Whether the public product story/traceability page is enabled for this product. Requires a supply chain to be attached to the product.","type":"boolean"},"brands":{"description":"Array of style property IDs of category 'brands'. Values must be created via POST /api/v2/style-properties/ before use. Free-text strings will be rejected with a 404.","anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"departments":{"description":"Array of style property IDs of category 'departments'. Values must be created via POST /api/v2/style-properties/ before use. Free-text strings will be rejected with a 404.","anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"seasons":{"description":"Array of style property IDs of category 'seasons'. Values must be created via POST /api/v2/style-properties/ before use. Free-text strings will be rejected with a 404.","anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"collections":{"description":"Array of style property IDs of category 'collections'. Values must be created via POST /api/v2/style-properties/ before use. Free-text strings will be rejected with a 404.","anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"claimIntentions":{"description":"Array of sustainability claim intention IDs to associate with this product.","anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"customProperties":{"description":"JSON string of arbitrary key-value pairs for custom metadata.","anyOf":[{"type":"string"},{"type":"null"}]},"suppliers":{"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.","anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"mainSupplier":{"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.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"vendors":{"description":"Array of vendor company IDs.","anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"imagesFileIds":{"description":"Array of file IDs for product images, obtained via the Files API.","anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"ecoFootPrint":{"description":"Sustainability and recyclability data for this product.","anyOf":[{"type":"object","properties":{"hazardousMaterials":{"description":"List of hazardous substances present in the product.","anyOf":[{"type":"array","items":{"type":"object","properties":{"idx":{"type":"number"},"name":{"description":"Name of the hazardous substance, e.g. 'Chromium'.","type":"string","minLength":1},"percentage":{"description":"Concentration of the substance as a percentage of total product weight (0–100).","type":"number","minimum":0,"maximum":100}},"required":["idx","name","percentage"]}},{"type":"null"}]},"recyclabilityAbsenceDisruptor":{"description":"True if there are no disruptors to recyclability (e.g. coatings, mixed materials).","anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityCanBeSorted":{"description":"True if the product can be sorted at recycling facilities.","anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityCanCollectAtScale":{"description":"True if collection infrastructure exists at scale for this product.","anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityIndustrialScale":{"description":"True if industrial-scale recycling processes exist for this product.","anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityRate":{"description":"Recyclability percentage (0–100).","anyOf":[{"type":"number"},{"type":"null"}]}}},{"type":"null"}]},"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.","anyOf":[{"type":"object","properties":{"unit":{"anyOf":[{"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"]},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["unit","value"]},{"type":"null"}]}},"required":["name","codes"],"example":{"name":"Geraldine Organic Cotton T-shirt","forCompanyId":"M4MRIN4A9JQ","codes":[{"codeId":"OTHER_ID","codeValue":"221739"}],"description":"Organic cotton T-shirt from the Collectif mon Amour collection.","gender":"FEMALE","styleTypeId":"TSHIRTS","isComponent":false,"isStoryActive":true,"brands":["stp_01KM2X04A6KXM1YZ0XFQ633BH1"],"departments":["AWU28X9KFYL"],"seasons":["stp_01KM2WY63RHNQXB3JRCF4VBBAY"],"collections":["stp_01KM2WYM0P1M5EGDQYCYR74B34"],"claimIntentions":[],"suppliers":["KFIXXMKJT3G","DCX5B2I5RM8"],"mainSupplier":"KFIXXMKJT3G","vendors":["KDYV8NRUGQY"],"ecoFootPrint":{"hazardousMaterials":null,"recyclabilityAbsenceDisruptor":false,"recyclabilityCanBeSorted":false,"recyclabilityCanCollectAtScale":false,"recyclabilityIndustrialScale":false,"recyclabilityRate":0},"weight":{"unit":"GRAM","value":180}}},"examples":{"default":{"summary":"Example request","value":{"name":"Geraldine Organic Cotton T-shirt","forCompanyId":"M4MRIN4A9JQ","codes":[{"codeId":"OTHER_ID","codeValue":"221739"}],"description":"Organic cotton T-shirt from the Collectif mon Amour collection.","gender":"FEMALE","styleTypeId":"TSHIRTS","isComponent":false,"isStoryActive":true,"brands":["stp_01KM2X04A6KXM1YZ0XFQ633BH1"],"departments":["AWU28X9KFYL"],"seasons":["stp_01KM2WY63RHNQXB3JRCF4VBBAY"],"collections":["stp_01KM2WYM0P1M5EGDQYCYR74B34"],"claimIntentions":[],"suppliers":["KFIXXMKJT3G","DCX5B2I5RM8"],"mainSupplier":"KFIXXMKJT3G","vendors":["KDYV8NRUGQY"],"ecoFootPrint":{"hazardousMaterials":null,"recyclabilityAbsenceDisruptor":false,"recyclabilityCanBeSorted":false,"recyclabilityCanCollectAtScale":false,"recyclabilityIndustrialScale":false,"recyclabilityRate":0},"weight":{"unit":"GRAM","value":180}}}}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}}}},"get":{"tags":["Product / Styles"],"description":"GET /styles serves all three tiers of the product hierarchy from a single endpoint, controlled by the required `level` query parameter. At `level=style` the endpoint returns top-level products and accepts optional filters (nameOrCode, updatedAfterUnixMs, page, pageSize). At `level=variant` a `styleId` is required and results are scoped to colour/variant children of that style. At `level=sku` a `variantId` is required and results are scoped to size/SKU children of that variant. Paginate using the `page` and `pageSize` params; check `metadata.pagination.totalPages` in the response to determine whether additional pages exist.","parameters":[{"schema":{"default":"style","type":"string","enum":["style","variant","sku"]},"in":"query","name":"level","required":false,"description":"Controls which tier of the product hierarchy is returned. 'style' = top-level product (no parent ID required). 'variant' = colour or variant (requires styleId). 'sku' = size or SKU (requires variantId). The updatedAfterUnixMs filter is supported at all three levels."},{"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","required":false,"description":"Page number (1-based). Defaults to 1. Check metadata.pagination.totalPages in the response to know if more pages exist."},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Number of results per page (1–100). Defaults to 20. Check metadata.pagination.totalPages in the response to know if more pages exist."},{"schema":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"in":"query","name":"order","required":false},{"schema":{"default":"createdAt","type":"string","enum":["createdAt","updatedAt","name","gender","typeName","color","styleId","dimension","variantId"]},"in":"query","name":"sort","required":false},{"schema":{"type":"string"},"in":"query","name":"name","required":false,"description":"Filter by product name (partial match)."},{"schema":{"type":"string"},"in":"query","name":"codeId","required":false,"description":"Filter by code type/ID, e.g. ERP_ID. Combine with codeValue."},{"schema":{"type":"string"},"in":"query","name":"codeValue","required":false,"description":"Filter by code value, e.g. DRS-001. Combine with codeId."},{"schema":{"type":"string"},"in":"query","name":"styleTypeId","required":false,"description":"Filter by style type ID."},{"schema":{"type":"string"},"in":"query","name":"styleLevelId","required":false,"description":"Filter by style level ID."},{"schema":{"type":"string"},"in":"query","name":"brands","required":false,"description":"Comma-separated list of brand IDs to filter by."},{"schema":{"type":"string"},"in":"query","name":"departments","required":false,"description":"Comma-separated list of department IDs to filter by."},{"schema":{"type":"string"},"in":"query","name":"seasons","required":false,"description":"Comma-separated list of season IDs to filter by."},{"schema":{"type":"string"},"in":"query","name":"collections","required":false,"description":"Comma-separated list of collection IDs to filter by."},{"schema":{"type":"string"},"in":"query","name":"suppliers","required":false,"description":"Comma-separated list of supplier IDs to filter by."},{"schema":{"type":"string"},"in":"query","name":"vendors","required":false,"description":"Comma-separated list of vendor IDs to filter by."},{"schema":{"type":"string"},"in":"query","name":"mainSupplier","required":false,"description":"Filter by main supplier ID."},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true"]},{"type":"string","enum":["false"]}]},"in":"query","name":"isComponent","required":false,"description":"Filter by component / raw material flag. Accepts true or false."},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true"]},{"type":"string","enum":["false"]}]},"in":"query","name":"isStoryActive","required":false,"description":"Filter by traceability page status. Accepts true or false."},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true"]},{"type":"string","enum":["false"]}]},"in":"query","name":"isArchived","required":false,"description":"Filter by archived status. Defaults to false."},{"schema":{"type":"string"},"in":"query","name":"include","required":false,"description":"Comma-separated list of related data to include, e.g. 'codes,brands'."},{"schema":{"type":"string"},"in":"query","name":"nameOrCode","required":false,"description":"Optional. Filter styles by name or external code value (partial match). Use to look up a specific product by its ERP ID, PLM ID, or display name."},{"schema":{"type":"string"},"in":"query","name":"description","required":false,"description":"Filter by description (partial match)."},{"schema":{"type":"string"},"in":"query","name":"gender","required":false,"description":"Filter by gender (e.g. MALE, FEMALE, UNISEX)."},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true"]},{"type":"string","enum":["false"]}]},"in":"query","name":"createdForMe","required":false,"description":"Filter to products created for your company."},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true"]},{"type":"string","enum":["false"]}]},"in":"query","name":"isCreatedForNetwork","required":false,"description":"Filter to products created for your network."},{"schema":{"type":"string"},"in":"query","name":"companyId","required":false,"description":"Filter by owning company ID."},{"schema":{"type":"string"},"in":"query","name":"certValidationStandardId","required":false,"description":"Filter by certification validation standard ID."},{"schema":{"type":"string"},"in":"query","name":"certValidationExpirationDate","required":false,"description":"Filter by certification expiration date."},{"schema":{"type":"string"},"in":"query","name":"certValidationIssueDate","required":false,"description":"Filter by certification issue date."},{"schema":{"type":"string"},"in":"query","name":"color","required":false,"description":"Filter variants by color. Only applicable when level=variant."},{"schema":{"type":"string"},"in":"query","name":"styleId","required":false,"description":"Filter variants by parent style ID. Only applicable when level=variant."},{"schema":{"type":"string"},"in":"query","name":"variantId","required":false,"description":"Filter SKUs by parent variant ID. Only applicable when level=sku."},{"schema":{"type":"string"},"in":"query","name":"dimension","required":false,"description":"Filter SKUs by dimension. Only applicable when level=sku."},{"schema":{"type":"number"},"in":"query","name":"updatedAfterUnixMs","required":false,"description":"Optional. Unix timestamp in milliseconds. Returns only styles modified after this point in time. Use for incremental sync — on subsequent calls pass the timestamp of your last successful pull."},{"schema":{"type":"number"},"in":"query","name":"updatedBeforeUnixMs","required":false,"description":"Return products updated before this Unix timestamp (milliseconds)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"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.","type":"string","minLength":1},"forCompanyId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"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.","type":"string","minLength":1},"codeValue":{"description":"The unique code value for this identifier, e.g. \"ERP-001234\".","type":"string","minLength":1}},"required":["codeId","codeValue"],"additionalProperties":false}},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"styleLevelId":{"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.","type":"string","minLength":1},"styleTypeId":{"type":"string","minLength":1},"productLevel":{"anyOf":[{"type":"string"},{"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"}]},"claimIntentions":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"customProperties":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"bucketName":{"type":"string"},"name":{"type":"string"},"fileSize":{"anyOf":[{"type":"number"},{"type":"null"}]},"contentType":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","url","previewUrl","fileType","bucketName","name","fileSize","contentType","fileHash","createdAt","updatedAt"],"additionalProperties":false}},"isComponent":{"anyOf":[{"type":"boolean"},{"type":"number"}]},"isStoryActive":{"anyOf":[{"type":"boolean"},{"type":"number"}]},"isArchived":{"description":"True if the product has been archived. Archived products are excluded from default API results.","type":"boolean"},"qrCodeUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"description":"ISO 8601 UTC timestamp of when the record was created.","anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"description":"ISO 8601 UTC timestamp of when the record was last modified. Use with updatedAfterUnixMs for incremental sync.","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"}]},"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":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityCanBeSorted":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityCanCollectAtScale":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityIndustrialScale":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityRate":{"anyOf":[{"type":"number"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"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"},"featureImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"material":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rawMaterialId":{"type":"string"},"rawMaterialName":{"type":"string"},"percentage":{"anyOf":[{"type":"number"},{"type":"null"}]},"countriesOfOrigin":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","rawMaterialId","rawMaterialName","percentage","countriesOfOrigin"],"additionalProperties":false}}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantityUnits":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"weightUnits":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"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,"example":{"metadata":{"success":true,"pagination":{"page":1,"limit":20,"total":2,"totalPages":1}},"data":[{"id":"style_01KM2XVHS8NCPRP3PD5EREZ30H","forCompanyId":"M4MRIN4A9JQ","name":"TENTA TEE","codes":[{"codeId":"OTHER_ID","codeValue":"1445678923"}],"description":"A marine graphic to fill up on salt water\n\nAll aboard! The TENTA TEE is your open invitation to ocean air and salty skin. Made from 180g organic cotton, it features a graphic blending palm trees, waves, and undersea creatures—symbols of everything we love about life near the water. Its classic cut and easy-to-match tones make it a staple for coastal escapes and nature-filled weekends. Let's meet at the shoreline—adventure awaits.","gender":null,"styleLevelId":"APPAREL_END_CONSUMER_FINISHED_GOODS","styleTypeId":"TSHIRTS","brands":["stp_01KM2XWW86E5RGCYYR0AG6AGE7"],"departments":["AWU28X9KFYL"],"seasons":["stp_01KM06Z3DN8MNPWTCH3FAZA86S"],"collections":["stp_01KM2XX5F0YC1KJ0Y2PFAZW9C6"],"claimIntentions":[],"customProperties":null,"suppliers":[],"mainSupplier":null,"vendors":[],"imagesFileIds":["22KLPeX1hrUpxUcvxyQgC","XVRvStFL4ZcE661WbrvaE","idAiVnD7WHrpxjfsw7aPx","Tt9yMYE2VjRVrKPzMcdzT","MzNt15T3X1rLhj34iwmtV"],"isComponent":false,"isStoryActive":true,"isArchived":false,"qrCodeUrl":"https://retraced-bucket-production-public.imgix.net/qr_01KM2XVJ3W5NT3JKTE4MDSWZY4.svg","createdAt":"2026-03-19T11:31:53.768Z","updatedAt":"2026-03-19T12:23:18.124Z","createdByImpersonateId":null,"createdByUserId":"BBS1KRZSDLZ","createdByCompanyId":"M4MRIN4A9JQ","createdByApiKeyId":null,"createdByApiKeyLabel":null,"updatedByImpersonateId":null,"updatedByUserId":"BBS1KRZSDLZ","updatedByCompanyId":"M4MRIN4A9JQ","updatedByApiKeyId":null,"updatedByApiKeyLabel":null,"ecoFootPrint":{"hazardousMaterials":null},"weight":null,"featureImageUrl":"https://retraced-bucket-production-public.imgix.net/22KLPeX1hrUpxUcvxyQgC.webp"},{"id":"LXMBF6U52MU","forCompanyId":"M4MRIN4A9JQ","name":"Skinny Jeans","codes":[{"codeId":"OTHER_ID","codeValue":"PC12345"}],"description":"Slim fit tight jeans","gender":"MALE","styleLevelId":"APPAREL_END_CONSUMER_FINISHED_GOODS","styleTypeId":"JEANS","brands":["TGT2ZEGUKZM"],"departments":["TKJTGU7LM8K"],"seasons":["N9OYY6LRO2WPZHUNAW"],"collections":[],"claimIntentions":[],"customProperties":null,"suppliers":["KFIXXMKJT3G"],"mainSupplier":null,"vendors":[],"imagesFileIds":["hbzmTA4oKsyGkmCGy2HWr"],"isComponent":false,"isStoryActive":true,"isArchived":false,"qrCodeUrl":"https://retraced-bucket-production-public.imgix.net/DYXC968XVF7YRJW0BP.svg","createdAt":"2025-10-10T08:50:57.911Z","updatedAt":"2026-03-05T10:18:28.066Z","createdByImpersonateId":null,"createdByUserId":"1MZFVJVYR63","createdByCompanyId":"M4MRIN4A9JQ","createdByApiKeyId":null,"createdByApiKeyLabel":null,"updatedByImpersonateId":null,"updatedByUserId":"1MZFVJVYR63","updatedByCompanyId":"M4MRIN4A9JQ","updatedByApiKeyId":null,"updatedByApiKeyLabel":null,"ecoFootPrint":{"hazardousMaterials":null},"weight":null,"featureImageUrl":"https://retraced-bucket-production-public.imgix.net/hbzmTA4oKsyGkmCGy2HWr.png"}]}}}}}}}},"/api/v2/styles/{id}":{"put":{"tags":["Product / Styles"],"description":"Update a style, variant, or SKU by ID. The product level is resolved automatically from the ID. All body fields are optional — only provided fields will be updated.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Display name for the product, e.g. 'Summer Blazer'.","type":"string","minLength":1,"maxLength":255},"forCompanyId":{"description":"Create this style on behalf of another company in your network.","type":"string"},"codes":{"minItems":1,"type":"array","items":{"type":"object","properties":{"codeId":{"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.","type":"string","minLength":1},"codeValue":{"description":"The unique code value for this identifier, e.g. \"ERP-001234\".","type":"string","minLength":1}},"required":["codeId","codeValue"]}},"description":{"description":"Free-text product description. Nullable. Max 4000 characters.","anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"gender":{"description":"Product gender classification. Known values: MALE, FEMALE, UNISEX. Nullable.","anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"styleTypeId":{"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/. Required when creating a top-level style (no parentId).","type":"string","minLength":1},"color":{"description":"Color name for a variant, e.g. 'Navy Blue'. Only applicable when parentId points to a style.","type":"string","minLength":1,"maxLength":255},"dimension":{"description":"Size or dimension for a SKU, e.g. 'M' or '38'. Only applicable when parentId points to a variant.","type":"string","minLength":1,"maxLength":255},"isStoryActive":{"description":"Whether the public product story/traceability page is enabled for this product. Requires a supply chain to be attached to the product.","type":"boolean"},"brands":{"description":"Array of style property IDs of category 'brands'. Values must be created via POST /api/v2/style-properties/ before use. Free-text strings will be rejected with a 404.","anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"departments":{"description":"Array of style property IDs of category 'departments'. Values must be created via POST /api/v2/style-properties/ before use. Free-text strings will be rejected with a 404.","anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"seasons":{"description":"Array of style property IDs of category 'seasons'. Values must be created via POST /api/v2/style-properties/ before use. Free-text strings will be rejected with a 404.","anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"collections":{"description":"Array of style property IDs of category 'collections'. Values must be created via POST /api/v2/style-properties/ before use. Free-text strings will be rejected with a 404.","anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"claimIntentions":{"description":"Array of sustainability claim intention IDs to associate with this product.","anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"customProperties":{"description":"JSON string of arbitrary key-value pairs for custom metadata.","anyOf":[{"type":"string"},{"type":"null"}]},"suppliers":{"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.","anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"mainSupplier":{"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.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"vendors":{"description":"Array of vendor company IDs.","anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"imagesFileIds":{"description":"Array of file IDs for product images, obtained via the Files API.","anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"ecoFootPrint":{"description":"Sustainability and recyclability data for this product.","anyOf":[{"type":"object","properties":{"hazardousMaterials":{"description":"List of hazardous substances present in the product.","anyOf":[{"type":"array","items":{"type":"object","properties":{"idx":{"type":"number"},"name":{"description":"Name of the hazardous substance, e.g. 'Chromium'.","type":"string","minLength":1},"percentage":{"description":"Concentration of the substance as a percentage of total product weight (0–100).","type":"number","minimum":0,"maximum":100}},"required":["idx","name","percentage"]}},{"type":"null"}]},"recyclabilityAbsenceDisruptor":{"description":"True if there are no disruptors to recyclability (e.g. coatings, mixed materials).","anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityCanBeSorted":{"description":"True if the product can be sorted at recycling facilities.","anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityCanCollectAtScale":{"description":"True if collection infrastructure exists at scale for this product.","anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityIndustrialScale":{"description":"True if industrial-scale recycling processes exist for this product.","anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityRate":{"description":"Recyclability percentage (0–100).","anyOf":[{"type":"number"},{"type":"null"}]}}},{"type":"null"}]},"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.","anyOf":[{"type":"object","properties":{"unit":{"anyOf":[{"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"]},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["unit","value"]},{"type":"null"}]},"styleLevelId":{"description":"ID of the style level to assign to this product.","type":"string","minLength":1}},"required":["name","codes"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true,"description":"ID of the style, variant, or SKU."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["metadata","data"],"additionalProperties":false}}}}}},"get":{"tags":["Product / Styles"],"description":"Retrieve a single style, variant, or SKU by ID. The product level is resolved automatically from the ID.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true,"description":"ID of the style, variant, or SKU."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"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.","type":"string","minLength":1},"forCompanyId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"codes":{"type":"array","items":{"type":"object","properties":{"codeId":{"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.","type":"string","minLength":1},"codeValue":{"description":"The unique code value for this identifier, e.g. \"ERP-001234\".","type":"string","minLength":1}},"required":["codeId","codeValue"],"additionalProperties":false}},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"styleLevelId":{"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.","type":"string","minLength":1},"styleTypeId":{"type":"string","minLength":1},"productLevel":{"anyOf":[{"type":"string"},{"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"}]},"claimIntentions":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"customProperties":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"bucketName":{"type":"string"},"name":{"type":"string"},"fileSize":{"anyOf":[{"type":"number"},{"type":"null"}]},"contentType":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","url","previewUrl","fileType","bucketName","name","fileSize","contentType","fileHash","createdAt","updatedAt"],"additionalProperties":false}},"isComponent":{"anyOf":[{"type":"boolean"},{"type":"number"}]},"isStoryActive":{"anyOf":[{"type":"boolean"},{"type":"number"}]},"isArchived":{"description":"True if the product has been archived. Archived products are excluded from default API results.","type":"boolean"},"qrCodeUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"description":"ISO 8601 UTC timestamp of when the record was created.","anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedAt":{"description":"ISO 8601 UTC timestamp of when the record was last modified. Use with updatedAfterUnixMs for incremental sync.","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"}]},"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":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityCanBeSorted":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityCanCollectAtScale":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityIndustrialScale":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"recyclabilityRate":{"anyOf":[{"type":"number"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"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"},"featureImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"material":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rawMaterialId":{"type":"string"},"rawMaterialName":{"type":"string"},"percentage":{"anyOf":[{"type":"number"},{"type":"null"}]},"countriesOfOrigin":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","rawMaterialId","rawMaterialName","percentage","countriesOfOrigin"],"additionalProperties":false}}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantityUnits":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"weightUnits":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"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},"dimension":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"variantId":{"anyOf":[{"type":"string"},{"type":"null"}]},"styleId":{"anyOf":[{"type":"string"},{"type":"null"}]},"overriddenFlag":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["id","forCompanyId","name","codes","styleLevelId","styleTypeId","isArchived"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false,"example":{"metadata":{"success":true},"data":{"id":"FA5TURRZBA3","forCompanyId":"M4MRIN4A9JQ","name":"Stone-Transparent-001-AW23","codes":[{"codeId":"EAN_GTIN_13","codeValue":"978020137962"},{"codeId":"OTHER_ID","codeValue":"ST243578-001-AW23"}],"description":"Rigid black denim heavy washed and treated mens regular straight fit jeans","gender":"MALE","styleLevelId":"APPAREL_END_CONSUMER_FINISHED_GOODS","styleTypeId":"JEANS","productLevel":"style","brands":["YCIZ224OHALGK2YU7Y"],"departments":["TKJTGU7LM8K"],"seasons":["stp_01KM2WY63RHNQXB3JRCF4VBBAY"],"collections":["stp_01KFG66VC1C74G9RP74AP8JPR3"],"claimIntentions":["GOTS"],"customProperties":null,"suppliers":["DN553A2VP56","4N3TWW6BVA8","S7CFG7ITY8B","8FE1ZAPSYF2"],"mainSupplier":"DN553A2VP56","vendors":["DN553A2VP56"],"imagesFileIds":["0CY0GOB0T7RCZD0A66","7BN1N1LRHUZZPFEQT6"],"images":[{"id":"0CY0GOB0T7RCZD0A66","url":"0CY0GOB0T7RCZD0A66.jpg","previewUrl":"https://retraced-bucket-production-public.imgix.net/0CY0GOB0T7RCZD0A66.jpg","fileType":"IMAGE","bucketName":"public","name":"jeans-homme-blue-clark-long34-X-2.jpg","fileSize":155976,"contentType":"image/jpeg","fileHash":"5c9085494eb594bad469bb9953031c1c4398a65afee8ae5b9a914c2a83362b5c","createdAt":"2024-03-11T15:58:42.000Z","updatedAt":"2024-03-11T15:58:42.000Z","createdBy":null,"createdByCompanyId":"M4MRIN4A9JQ","createdByImpersonateId":null,"createdByImpersonateName":null,"createdByUserId":"MXP5E436ZRD","createdByApiKeyId":null,"createdByApiKeyLabel":null,"updatedByUserId":"MXP5E436ZRD","updatedByUserName":null,"updatedByCompanyId":"M4MRIN4A9JQ","updatedByCompanyName":null,"updatedByImpersonateId":null,"updatedByImpersonateName":null,"updatedByApiKeyId":null,"updatedByApiKeyLabel":null},{"id":"7BN1N1LRHUZZPFEQT6","url":"7BN1N1LRHUZZPFEQT6.jpg","previewUrl":"https://retraced-bucket-production-public.imgix.net/7BN1N1LRHUZZPFEQT6.jpg","fileType":"IMAGE","bucketName":"public","name":"jeans-homme-blue-clark-long34-X.jpg","fileSize":315769,"contentType":"image/jpeg","fileHash":"4171f5ccb21d28454693eb513abffb0a6de96972312e1c3c4eb153b62a47f272","createdAt":"2024-03-11T15:58:42.000Z","updatedAt":"2024-03-11T15:58:42.000Z","createdBy":null,"createdByCompanyId":"M4MRIN4A9JQ","createdByImpersonateId":null,"createdByImpersonateName":null,"createdByUserId":"MXP5E436ZRD","createdByApiKeyId":null,"createdByApiKeyLabel":null,"updatedByUserId":"MXP5E436ZRD","updatedByUserName":null,"updatedByCompanyId":"M4MRIN4A9JQ","updatedByCompanyName":null,"updatedByImpersonateId":null,"updatedByImpersonateName":null,"updatedByApiKeyId":null,"updatedByApiKeyLabel":null}],"isComponent":false,"isStoryActive":true,"isArchived":false,"qrCodeUrl":"https://retraced-bucket-production-public.imgix.net/RJUJ7AC9S61.svg","createdAt":"2022-06-02T11:50:58.028Z","updatedAt":"2026-06-15T14:02:53.729Z","createdByImpersonateId":null,"createdByUserId":"GZXUI1P6Q24","createdByCompanyId":"M4MRIN4A9JQ","createdByApiKeyId":null,"createdByApiKeyLabel":null,"updatedByImpersonateId":null,"updatedByUserId":"XI9MMYMZK7K","updatedByCompanyId":"M4MRIN4A9JQ","updatedByApiKeyId":null,"updatedByApiKeyLabel":null,"ecoFootPrint":{"syntheticMaterialPercentage":0,"recycledMaterialPercentage":0,"hazardousMaterials":[],"recyclabilityAbsenceDisruptor":false,"recyclabilityCanBeSorted":false,"recyclabilityCanCollectAtScale":false,"recyclabilityIndustrialScale":false,"recyclabilityRate":0},"weight":{"unit":"GRAM","value":400},"tracingStory":{"id":"prdstory_01KQCT8350CB2N2NAF9WAHJ2JT","tracingType":"SUPPLY_CHAIN_MAPPINGS","tracingId":"L41RWLMA367","isActive":true,"createdAt":"2026-04-29T14:28:20.256Z","updatedAt":"2026-04-29T15:16:16.451Z"},"isWeightAvailable":true}}}}}}}}},"/api/v2/styles/archive":{"post":{"tags":["Product / Styles"],"description":"Archive one or more styles, variants, or SKUs. All IDs must belong to the same product level. Archiving a style cascades to all its child variants and SKUs.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"description":"Array of IDs to archive or unarchive. Max 100. All IDs must belong to the same product level (style, variant, or SKU).","minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"shouldUnarchiveChildren":{"description":"Whether to cascade the operation to child variants and SKUs. Defaults to true.","default":true,"type":"boolean"}},"required":["ids"]}}}},"responses":{"204":{"description":"No content"}}}},"/api/v2/styles/unarchive":{"post":{"tags":["Product / Styles"],"description":"Unarchive one or more styles, variants, or SKUs. All IDs must belong to the same product level.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"description":"Array of IDs to archive or unarchive. Max 100. All IDs must belong to the same product level (style, variant, or SKU).","minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"shouldUnarchiveChildren":{"description":"Whether to cascade the operation to child variants and SKUs. Defaults to true.","default":true,"type":"boolean"}},"required":["ids"]}}}},"responses":{"204":{"description":"No content"}}}},"/api/v2/style-types/":{"get":{"tags":["Product / Style Types"],"description":"Returns a paginated list of style types configured for the account. Style types define the taxonomy used to classify styles — for example TSHIRTS, JEANS, OUTDOOR_JACKETS — and are organised in a hierarchy via parentId and hierarchyLevel. The id returned for each style type is the value to pass in the styleTypeId field when creating or updating a style via POST /api/v2/styles/. Use this endpoint to discover valid styleTypeId values before creating styles, as passing an unrecognised value will result in an error. Filter by hierarchyLevel to retrieve only top-level categories or leaf nodes, or by parentId to retrieve the children of a specific type.","parameters":[{"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":"limit","required":false},{"schema":{"default":"name","type":"string","enum":["name","createdAt","updatedAt"]},"in":"query","name":"sort","required":false},{"schema":{"default":"asc","type":"string","enum":["asc","desc","ASC","DESC"]},"in":"query","name":"order","required":false},{"schema":{"type":"string"},"in":"query","name":"name","required":false},{"schema":{"type":"number"},"in":"query","name":"hierarchyLevel","required":false},{"schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"in":"query","name":"parentId","required":false},{"schema":{"anyOf":[{"type":"string"},{"type":"boolean"}]},"in":"query","name":"hasParentId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantityUnits":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"weightUnits":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"isWeightAvailable":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"assetId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assetType":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"hierarchyLevel":{"anyOf":[{"type":"number"},{"type":"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}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/v2/style-properties/":{"post":{"summary":"Create a Style Property","tags":["Product / Style Properties"],"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,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"$ref":"#/components/schemas/StylePropertySchema"}},"required":["metadata","data"],"additionalProperties":false}}}}}},"get":{"summary":"List Style Properties","tags":["Product / Style Properties"],"description":"Returns a paginated list of style properties for the authenticated company. Style properties are the predefined lookup values used to populate the brands, seasons, collections, and departments fields on a style. Use the category query parameter to filter by a specific type. The id returned for each property is what must be passed when creating or updating styles.","parameters":[{"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":"limit","required":false},{"schema":{"default":"createdAt","type":"string","enum":["value","category","createdAt","updatedAt","createdByUserId","updatedByUserId"]},"in":"query","name":"sort","required":false},{"schema":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"in":"query","name":"order","required":false},{"schema":{"type":"string","enum":["brands","departments","seasons","collections"]},"in":"query","name":"category","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"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":{"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}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/v2/bom-headers/":{"post":{"tags":["Product / 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,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{}},"required":["metadata","data"],"additionalProperties":false}}}}}},"get":{"tags":["Product / BOM Headers"],"parameters":[{"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":"limit","required":false},{"schema":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"in":"query","name":"order","required":false},{"schema":{"default":"createdAt","type":"string","enum":["createdAt","updatedAt","name","version","effectiveStartDate","effectiveEndDate"]},"in":"query","name":"sort","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"styleId","required":true},{"schema":{"type":"string"},"in":"query","name":"ids","required":false},{"schema":{"type":"string"},"in":"query","name":"name","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true"]},{"type":"string","enum":["false"]}]},"in":"query","name":"isArchived","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true"]},{"type":"string","enum":["false"]}]},"in":"query","name":"isMainBom","required":false},{"schema":{"type":"number"},"in":"query","name":"version","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"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":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"forCompanyId":{"type":"string","minLength":1},"version":{"anyOf":[{"type":"number"},{"type":"null"}]},"effectiveStartDate":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]},"effectiveEndDate":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]},"isArchived":{"type":"boolean"},"link":{"anyOf":[{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"isMainBom":{"default":false,"type":"boolean"},"isOwner":{"default":true,"type":"boolean"}},"required":["styleId","isMainBom","isOwner"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]}},"required":["id","name","forCompanyId","isArchived","link","createdAt","updatedAt"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/v2/bom-headers/delete":{"post":{"tags":["Product / 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,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"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/v2/bom-headers/{id}":{"put":{"tags":["Product / 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,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"forCompanyId":{"type":"string","minLength":1},"version":{"anyOf":[{"type":"number"},{"type":"null"}]},"effectiveStartDate":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]},"effectiveEndDate":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]},"isArchived":{"type":"boolean"},"link":{"anyOf":[{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"isMainBom":{"default":false,"type":"boolean"},"isOwner":{"default":true,"type":"boolean"}},"required":["styleId","isMainBom","isOwner"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]}},"required":["id","name","forCompanyId","isArchived","link","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}},"get":{"tags":["Product / 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,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"forCompanyId":{"type":"string","minLength":1},"version":{"anyOf":[{"type":"number"},{"type":"null"}]},"effectiveStartDate":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]},"effectiveEndDate":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]},"isArchived":{"type":"boolean"},"link":{"anyOf":[{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"isMainBom":{"default":false,"type":"boolean"},"isOwner":{"default":true,"type":"boolean"}},"required":["styleId","isMainBom","isOwner"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"createdByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]}},"required":["id","name","forCompanyId","isArchived","link","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/v2/bom-lines/":{"post":{"tags":["Product / BOM Lines"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"bomHeaderId":{"type":"string","minLength":1},"placementId":{"anyOf":[{"type":"string"},{"type":"null"}]},"entity":{"type":"object","properties":{"styleId":{"type":"string","minLength":1}},"required":["styleId"]},"quantity":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"quantityUnit":{"anyOf":[{"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"]},{"type":"null"}]},"weight":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"weightUnit":{"anyOf":[{"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"]},{"type":"null"}]},"countryOfOrigin":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"isMainComponent":{"default":false,"type":"boolean"},"component":{"type":"object","properties":{"styleId":{"type":"string","minLength":1}},"required":["styleId"]}},"required":["bomHeaderId","entity","component"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"bomHeaderId":{"type":"string"},"placementId":{"anyOf":[{"type":"string"},{"type":"null"}]},"styleId":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"quantityUnit":{"anyOf":[{"type":"string"},{"type":"null"}]},"weight":{"anyOf":[{"type":"number"},{"type":"null"}]},"weightUnit":{"anyOf":[{"type":"string"},{"type":"null"}]},"countryOfOrigin":{"anyOf":[{"type":"string"},{"type":"null"}]},"isMainComponent":{"type":"boolean"},"createdAt":{"type":"string"},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string"},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","bomHeaderId","placementId","styleId","quantity","quantityUnit","weight","weightUnit","countryOfOrigin","isMainComponent","createdAt","createdByUserId","createdByCompanyId","updatedAt","updatedByUserId","updatedByCompanyId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}},"get":{"tags":["Product / BOM Lines"],"parameters":[{"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":"limit","required":false},{"schema":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"in":"query","name":"order","required":false},{"schema":{"default":"createdAt","type":"string","enum":["createdAt","updatedAt","quantity","weight"]},"in":"query","name":"sort","required":false},{"schema":{"type":"string"},"in":"query","name":"bomHeaderId","required":false},{"schema":{"type":"string"},"in":"query","name":"styleId","required":false},{"schema":{"type":"string"},"in":"query","name":"placementId","required":false},{"schema":{"type":"string"},"in":"query","name":"countryOfOrigin","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true"]},{"type":"string","enum":["false"]}]},"in":"query","name":"isMainComponent","required":false},{"schema":{"type":"string"},"in":"query","name":"include","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"styleId":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"quantityUnit":{"anyOf":[{"type":"string"},{"type":"null"}]},"weight":{"anyOf":[{"type":"number"},{"type":"null"}]},"weightUnit":{"anyOf":[{"type":"string"},{"type":"null"}]},"countryOfOrigin":{"anyOf":[{"type":"string"},{"type":"null"}]},"isMainComponent":{"type":"boolean"},"createdAt":{"type":"string"},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string"},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"entity":{"type":"object","properties":{"id":{"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":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"mainSupplier":{"anyOf":[{"type":"string"},{"type":"null"}]}},"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/v2/bom-lines/delete":{"post":{"tags":["Product / BOM Lines"],"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}},"required":["bomLineIds","styleId"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"deletedLines":{"description":"IDs of successfully deleted BOM lines","type":"array","items":{"type":"string"}},"duplicatedHeaders":{"description":"Details of headers that were duplicated for child entities","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}},"orphanedHeaders":{"description":"IDs of headers that were cleaned up","type":"array","items":{"type":"string"}},"errors":{"description":"Errors encountered during deletion process","type":"array","items":{"type":"object","properties":{"bomLineId":{"type":"string"},"error":{"type":"string"}},"required":["bomLineId","error"],"additionalProperties":false}}},"required":["deletedLines","duplicatedHeaders","orphanedHeaders","errors"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/v2/bom-lines/{id}":{"put":{"tags":["Product / BOM Lines"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"type":"object","properties":{"styleId":{"type":"string","minLength":1}},"required":["styleId"]},"component":{"type":"object","properties":{"styleId":{"type":"string","minLength":1}},"required":["styleId"]},"placementId":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"quantityUnit":{"anyOf":[{"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"]},{"type":"null"}]},"weight":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"weightUnit":{"anyOf":[{"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"]},{"type":"null"}]},"countryOfOrigin":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"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,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"bomHeaderId":{"type":"string"},"placementId":{"anyOf":[{"type":"string"},{"type":"null"}]},"styleId":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"quantityUnit":{"anyOf":[{"type":"string"},{"type":"null"}]},"weight":{"anyOf":[{"type":"number"},{"type":"null"}]},"weightUnit":{"anyOf":[{"type":"string"},{"type":"null"}]},"countryOfOrigin":{"anyOf":[{"type":"string"},{"type":"null"}]},"isMainComponent":{"type":"boolean"},"createdAt":{"type":"string"},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string"},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"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/v2/bom-placements/":{"post":{"tags":["Product / 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,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","value","forCompanyId","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}},"400":{"description":"No content"}}},"get":{"tags":["Product / BOM Placements"],"parameters":[{"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":"limit","required":false},{"schema":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"in":"query","name":"order","required":false},{"schema":{"default":"createdAt","type":"string","enum":["createdAt","updatedAt","value"]},"in":"query","name":"sort","required":false},{"schema":{"type":"string"},"in":"query","name":"ids","required":false},{"schema":{"type":"string"},"in":"query","name":"value","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","value","forCompanyId","createdAt","updatedAt"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/v2/bom-placements/{id}":{"get":{"tags":["Product / 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,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","value","forCompanyId","createdAt","updatedAt"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/v2/material-headers/":{"post":{"tags":["Product / Material Headers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"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,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"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":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"link":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"isMainMaterial":{"type":"boolean"},"isOwner":{"type":"boolean"}},"required":["styleId","isMainMaterial"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","forCompanyId","link"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}},"get":{"tags":["Product / Material Headers"],"parameters":[{"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":"limit","required":false},{"schema":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"in":"query","name":"order","required":false},{"schema":{"default":"name","type":"string","enum":["name","styleId","createdAt","updatedAt"]},"in":"query","name":"sort","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"styleId","required":true},{"schema":{"type":"string"},"in":"query","name":"name","required":false},{"schema":{"type":"string"},"in":"query","name":"description","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true"]},{"type":"string","enum":["false"]}]},"in":"query","name":"isMainMaterial","required":false},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true"]},{"type":"string","enum":["false"]}]},"in":"query","name":"isOwner","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"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":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"link":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"isMainMaterial":{"type":"boolean"},"isOwner":{"type":"boolean"}},"required":["styleId","isMainMaterial"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","forCompanyId","link"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/v2/material-headers/{id}":{"get":{"tags":["Product / 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,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"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":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"link":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"isMainMaterial":{"type":"boolean"},"isOwner":{"type":"boolean"}},"required":["styleId","isMainMaterial"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","forCompanyId","link"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}},"put":{"tags":["Product / Material Headers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"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,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"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":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"link":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"isMainMaterial":{"type":"boolean"},"isOwner":{"type":"boolean"}},"required":["styleId","isMainMaterial"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","forCompanyId","link"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/v2/material-headers/delete":{"post":{"tags":["Product / 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,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"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/v2/material-lines/":{"post":{"tags":["Product / Material Lines"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"materialHeaderId":{"type":"string","minLength":1},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"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","parentId","percentage","rawMaterialId"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"materialHeaderId":{"type":"string"},"rawMaterialId":{"anyOf":[{"type":"string"},{"type":"null"}]},"percentage":{"anyOf":[{"type":"number"},{"type":"null"}]},"weights":{"anyOf":[{"type":"number"},{"type":"null"}]},"weightUnit":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"hierarchy":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"anyOf":[{"type":"number"},{"type":"null"}]},"countriesOfOrigin":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time"},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","materialHeaderId","rawMaterialId","percentage","weights","weightUnit","parentId","hierarchy","position","countriesOfOrigin","createdAt","createdByUserId","createdByCompanyId","updatedAt","updatedByUserId","updatedByCompanyId"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}},"get":{"tags":["Product / Material Lines"],"parameters":[{"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":"limit","required":false},{"schema":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"in":"query","name":"order","required":false},{"schema":{"default":"materialHeaderId","type":"string","enum":["materialHeaderId","rawMaterialId","percentage","hierarchy","position","createdAt","updatedAt"]},"in":"query","name":"sort","required":false},{"schema":{"type":"string"},"in":"query","name":"materialHeaderId","required":false},{"schema":{"type":"string"},"in":"query","name":"rawMaterialId","required":false},{"schema":{"type":"string"},"in":"query","name":"parentId","required":false},{"schema":{"type":"string"},"in":"query","name":"countriesOfOrigin","required":false},{"schema":{"type":"string"},"in":"query","name":"include","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"percentage":{"anyOf":[{"type":"number"},{"type":"null"}]},"weights":{"anyOf":[{"type":"number"},{"type":"null"}]},"weightUnit":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"hierarchy":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"anyOf":[{"type":"number"},{"type":"null"}]},"countriesOfOrigin":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time"},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"rawMaterial":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"isRecycled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"isSynthetic":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"currencyName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"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/v2/material-lines/delete":{"post":{"tags":["Product / 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,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"deletedLines":{"description":"IDs of successfully deleted material lines","type":"array","items":{"type":"string"}},"duplicatedHeaders":{"description":"Details of headers that were duplicated for child entities","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}},"orphanedHeaders":{"description":"IDs of headers that were cleaned up","type":"array","items":{"type":"string"}},"errors":{"description":"Errors encountered during deletion process","type":"array","items":{"type":"object","properties":{"materialLineId":{"type":"string"},"message":{"type":"string"}},"required":["materialLineId","message"],"additionalProperties":false}}},"required":["deletedLines","duplicatedHeaders","orphanedHeaders","errors"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/v2/material-lines/{id}":{"put":{"tags":["Product / Material Lines"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"styleId":{"type":"string","minLength":1},"materialHeaderId":{"type":"string","minLength":1},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"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,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"materialHeaderId":{"type":"string"},"rawMaterialId":{"anyOf":[{"type":"string"},{"type":"null"}]},"percentage":{"anyOf":[{"type":"number"},{"type":"null"}]},"weights":{"anyOf":[{"type":"number"},{"type":"null"}]},"weightUnit":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"hierarchy":{"anyOf":[{"type":"number"},{"type":"null"}]},"position":{"anyOf":[{"type":"number"},{"type":"null"}]},"countriesOfOrigin":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time"},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"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/v2/supply-chains/{id}":{"get":{"tags":["Product / Supply Chains"],"description":"Returns the supply chain data for a product with enriched node information.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true,"description":"The Retraced product ID of the product to fetch the supply chain for (this is a product ID, not a supply chain ID)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"productId":{"type":"string"},"productName":{"anyOf":[{"type":"string"},{"type":"null"}]},"nodesByProductionProcesses":{"type":"array","items":{"type":"object","properties":{"productionProcessId":{"type":"string"},"productionProcessName":{"anyOf":[{"type":"string"},{"type":"null"}]},"tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"nodes":{"type":"array","items":{"type":"object","properties":{"tier":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"coordinates":{"anyOf":[{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"}},"required":["latitude","longitude"],"additionalProperties":false},{"type":"null"}]},"address":{"anyOf":[{"type":"object","properties":{"line1":{"anyOf":[{"type":"string"},{"type":"null"}]},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"zipCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["line1","line2","city","zipCode","country"],"additionalProperties":false},{"type":"null"}]},"facilityProcesses":{"type":"array","items":{"type":"string"}},"productionProcess":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["tier","companyId","companyName","country","coordinates","address","facilityProcesses","productionProcess"],"additionalProperties":false}}},"required":["productionProcessId","productionProcessName","tier","nodes"],"additionalProperties":false}}},"required":["productId","productName","nodesByProductionProcesses"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false,"example":{"metadata":{"success":true},"data":{"productId":"FA5TURRZBA3","productName":"Stone-Transparent-001-AW23","nodesByProductionProcesses":[{"productionProcessId":"RAW_MATERIAL_CREATION","productionProcessName":"Raw material creation","tier":"T4","nodes":[{"tier":"T4","companyId":"U39Q21S2WUS","companyName":"Fabulous Farmers","country":"IN","coordinates":{"latitude":19.141567,"longitude":72.83038},"address":{"line1":"Sesamestreet","line2":null,"city":null,"zipCode":"123456","country":"IN"},"facilityProcesses":["Farm"],"productionProcess":"Raw material creation"}]},{"productionProcessId":"RAW_MATERIAL_PROCESSING","productionProcessName":"Raw material processing","tier":"T4","nodes":[{"tier":"T4","companyId":"8JJNQJGUDLB","companyName":"COTRA Cotton Trade Demo","country":"BD","coordinates":{"latitude":24,"longitude":90},"address":{"line1":null,"line2":null,"city":null,"zipCode":null,"country":"BD"},"facilityProcesses":["Raw material trader"],"productionProcess":"Raw material processing"},{"tier":"T4","companyId":"K7DBMP6YQI2","companyName":"Ginny's ginners","country":"IN","coordinates":{"latitude":21.616579,"longitude":73.037109},"address":{"line1":"Ground floor, Room No 18 Dhanukar Bldg, Opp Round Bldg","line2":null,"city":null,"zipCode":"400002","country":"IN"},"facilityProcesses":["Ginning mill"],"productionProcess":"Raw material processing"}]},{"productionProcessId":"YARN_PROCESSING","productionProcessName":"Yarn processing","tier":"T3","nodes":[{"tier":"T3","companyId":"EJNZSHPSXMA","companyName":"Spinning Mills Ltd.","country":"CN","coordinates":{"latitude":36.11667,"longitude":120.4},"address":{"line1":"Spinstreet 4","line2":null,"city":null,"zipCode":null,"country":"CN"},"facilityProcesses":["Spinning"],"productionProcess":"Yarn processing"}]},{"productionProcessId":"FABRIC_PROCESSING","productionProcessName":"Fabric processing","tier":"T2","nodes":[{"tier":"T2","companyId":"29ZRHV5SV6T","companyName":"Fabric Demo Company","country":"BD","coordinates":{"latitude":23.460998,"longitude":91.179692},"address":{"line1":null,"line2":null,"city":null,"zipCode":"3560","country":"BD"},"facilityProcesses":["Weaving"],"productionProcess":"Fabric processing"}]},{"productionProcessId":"TRIMS_AND_COMPONENTS","productionProcessName":"Trims and components","tier":"T2","nodes":[{"tier":"T2","companyId":"7KBNXEDYEY2","companyName":"Zippy zippers","country":"US","coordinates":{"latitude":32.113404,"longitude":-86.77002},"address":{"line1":"Zipper Road","line2":null,"city":null,"zipCode":null,"country":"US"},"facilityProcesses":["Zipper supplier"],"productionProcess":"Trims and components"}]},{"productionProcessId":"PACKAGING","productionProcessName":"Packaging","tier":"T1","nodes":[{"tier":"T1","companyId":"KYM365DPLCS","companyName":"Packing Demo Company","country":"HR","coordinates":{"latitude":-53.155673,"longitude":-70.902387},"address":{"line1":"Av. Pdte. Manuel Bulnes 336","line2":null,"city":"Punta Arenas","zipCode":"20000","country":"CL"},"facilityProcesses":["Packaging supplier"],"productionProcess":"Packaging"}]},{"productionProcessId":"MANUFACTURING","productionProcessName":"Manufacturing","tier":"T1","nodes":[{"tier":"T1","companyId":"NHSMV5VCRX1","companyName":"Demo Print Company","country":"MA","coordinates":{"latitude":33.593151,"longitude":-7.631453},"address":{"line1":null,"line2":null,"city":null,"zipCode":"27182","country":"MA"},"facilityProcesses":["Printer"],"productionProcess":"Manufacturing"},{"tier":"T1","companyId":"KFIXXMKJT3G","companyName":"A. Istanbul Textile A.Ş","country":"TR","coordinates":{"latitude":40.971604,"longitude":28.773194},"address":{"line1":"Izmoru Street","line2":null,"city":"Istanbul","zipCode":"20354","country":"TR"},"facilityProcesses":["Cut make trim (CMT)"],"productionProcess":"Manufacturing"}]},{"productionProcessId":"RETAILER","productionProcessName":"Retailer","tier":"T0","nodes":[{"tier":"T0","companyId":"M4MRIN4A9JQ","companyName":"Blue Sky Company","country":"US","coordinates":{"latitude":39.101454,"longitude":-84.51246},"address":{"line1":"Main Street 203","line2":null,"city":null,"zipCode":"45201","country":"US"},"facilityProcesses":["Retailer"],"productionProcess":"Retailer"}]}]}}}}}}}}},"/api/v2/certificates/":{"get":{"tags":["Certificates"],"description":"List certificates","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"in":"query","name":"order","required":false},{"schema":{"default":"name","type":"string","enum":["name","companyName","status","updatedAt","expirationDate","type","documentNumber","licenseNumber","issueDate","issuedBy"]},"in":"query","name":"sort","required":false},{"schema":{"type":"string"},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"query","name":"type","required":false},{"schema":{"type":"string"},"in":"query","name":"companyId","required":false},{"schema":{"type":"string"},"in":"query","name":"standardId","required":false},{"schema":{"type":"string"},"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,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"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},"type":{"type":"string","enum":["MEMBERSHIP","PRODUCT","TRANSACTION","COMPANY","SCOPE"]},"companyId":{"type":"string","minLength":1},"companyName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"companyOfficialName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"documentNumber":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"licenseNumber":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"issueDate":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]},"issuedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"expirationDate":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["DRAFT","REQUESTED","APPROVED","REJECTED","ACKNOWLEDGED","NOT_VERIFIABLE"]},"fileUrl":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"fileContentType":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","name","type","companyId","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"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/v2/certificates/{id}":{"get":{"tags":["Certificates"],"description":"Get certificate 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,"type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["MEMBERSHIP","PRODUCT","TRANSACTION","COMPANY","SCOPE"]},"companyId":{"type":"string","minLength":1},"companyName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"companyOfficialName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"documentNumber":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"licenseNumber":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"issueDate":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]},"issuedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"expirationDate":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},{"type":"null"}]},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["DRAFT","REQUESTED","APPROVED","REJECTED","ACKNOWLEDGED","NOT_VERIFIABLE"]},"fileUrl":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"fileContentType":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["id","name","type","companyId","status"],"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"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"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"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/v2/companies/":{"get":{"tags":["Companies"],"description":"List companies in your network","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"default":"desc","type":"string","enum":["asc","desc","ASC","DESC"]},"in":"query","name":"order","required":false},{"schema":{"default":"name","type":"string","enum":["name","createdAt","updatedAt"]},"in":"query","name":"sort","required":false},{"schema":{"type":"string","maxLength":512},"in":"query","name":"filter","required":false},{"schema":{"default":"false","anyOf":[{"type":"string"},{"type":"boolean"}]},"in":"query","name":"isSupplierNetwork","required":false},{"schema":{"type":"string"},"in":"query","name":"companyIds","required":false},{"schema":{"type":"string"},"in":"query","name":"excludeCompanyIds","required":false},{"schema":{"type":"string"},"in":"query","name":"findSimilar","required":false},{"schema":{"type":"string"},"in":"query","name":"name","required":false},{"schema":{"default":"false","anyOf":[{"type":"string"},{"type":"boolean"}]},"in":"query","name":"includeOwnCompany","required":false},{"schema":{"default":"false","anyOf":[{"type":"string"},{"type":"boolean"}]},"in":"query","name":"isDropDown","required":false},{"schema":{"type":"string"},"in":"query","name":"hasFeature","required":false},{"schema":{"default":"false","anyOf":[{"type":"string"},{"type":"boolean"}]},"in":"query","name":"hasGeojson","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"officialName":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"byCompanyId":{"type":"string"},"onBehalfOfCompanyId":{"type":"string"},"profileType":{"type":"string"},"count":{"type":"number"},"creationDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectionDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"facilityProcesses":{"anyOf":[{"type":"string"},{"type":"null"}]},"relationshipType":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"text":{"type":"string"}},"required":["id"],"additionalProperties":false}},{"type":"null"}]},"imageList":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"fileType":{"type":"string"}},"required":["id","url"],"additionalProperties":false},{"type":"null"}]}},{"type":"null"}]},"connectionType":{"anyOf":[{"type":"string"},{"type":"null"}]},"supplyChainTier":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"responsiblePerson":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"text":{"type":"string"}},"required":["id"],"additionalProperties":false}},{"type":"null"}]},"vendors":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"text":{"type":"string"}},"required":["id"],"additionalProperties":false}},{"type":"null"}]},"agents":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"text":{"type":"string"}},"required":["id"],"additionalProperties":false}},{"type":"null"}]},"geojson":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"transliteratedDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"transliteratedOfficialName":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"countryName":{"anyOf":[{"type":"string"},{"type":"null"}]},"addressLine1":{"anyOf":[{"type":"string"},{"type":"null"}]},"addressLine2":{"anyOf":[{"type":"string"},{"type":"null"}]},"county":{"anyOf":[{"type":"string"},{"type":"null"}]},"zipCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"facEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"companySize":{"anyOf":[{"type":"string"},{"type":"null"}]},"companyType":{"anyOf":[{"type":"string"},{"type":"null"}]},"founded":{"anyOf":[{"type":"string"},{"type":"null"}]},"videoFile":{"anyOf":[{"type":"string"},{"type":"null"}]},"collaborationStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"collaborationStartDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"retracedRiskScore":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"collaborationEndDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"internalCompanyCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"totalUsersCount":{"type":"number"},"activeUsersCount":{"type":"number"},"invitedUsersCount":{"type":"number"},"featuredImageFileUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"originalFeaturedImageFileUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"originalVideoFileUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectionTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","officialName","name","updatedAt","key","byCompanyId","onBehalfOfCompanyId","profileType","creationDate","connectionDate","createdAt","createdByImpersonateId","createdByUserId","createdByCompanyId","createdByApiKeyId","updatedByImpersonateId","updatedByUserId","updatedByCompanyId","updatedByApiKeyId","facilityProcesses","relationshipType","imageList","connectionType","supplyChainTier","responsiblePerson","vendors","agents","geojson","displayName","transliteratedDisplayName","transliteratedOfficialName","description","country","countryName","addressLine1","addressLine2","county","zipCode","website","phone","facEmail","companySize","companyType","founded","videoFile","collaborationStatus","collaborationStartDate","city","collaborationEndDate","internalCompanyCode","totalUsersCount","activeUsersCount","invitedUsersCount","originalVideoFileUrl","connectionTypeId"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false,"example":{"metadata":{"success":true,"pagination":{"page":1,"limit":2,"total":101,"totalPages":51}},"data":[{"id":"LD1FQKPIB89","officialName":"Zipper Demo Company","name":"Zipper Demo Company","updatedAt":"2026-06-11T06:43:02.905Z","key":"LD1FQKPIB89","byCompanyId":"M4MRIN4A9JQ","onBehalfOfCompanyId":"M4MRIN4A9JQ","profileType":"ABOUT","count":101,"creationDate":"2022-05-13T08:26:11.286Z","connectionDate":"2022-05-13T08:26:11.286Z","createdAt":"2022-05-13T08:26:11.286Z","createdByImpersonateId":"HM9TRNB5MQ7","createdByUserId":"GZXUI1P6Q24","createdByCompanyId":"M4MRIN4A9JQ","createdByApiKeyId":null,"updatedByImpersonateId":null,"updatedByUserId":"IXKEIR4YEYF","updatedByCompanyId":"M4MRIN4A9JQ","updatedByApiKeyId":null,"facilityProcesses":"ZIPPER_SUPPLIER","relationshipType":[{"id":"MV2LA4RK6EKCH5IASD"}],"imageList":[{"id":"MTZK7H1Q5J4PG3GXK2","url":"https://retraced-bucket-production-public.imgix.net/MTZK7H1Q5J4PG3GXK2.png","fileType":"IMAGE"}],"connectionType":"SUPPLIER","supplyChainTier":null,"responsiblePerson":null,"vendors":null,"agents":null,"geojson":"{\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [9.502744, 40.923266]}}","displayName":"Zipper Demo Company","transliteratedDisplayName":null,"transliteratedOfficialName":null,"description":"Zipper Demo Company was founded in Olbia in 1934 and can be found in 90 companies in over 60 counties/regions with over 42,000 employees globally.","country":"IT","countryName":"Italy","addressLine1":null,"addressLine2":null,"county":null,"zipCode":"07026","website":null,"phone":null,"facEmail":null,"companySize":"FROM_10001_TO_INFINITE","companyType":null,"founded":null,"videoFile":null,"collaborationStatus":"AA92A7ZX519I2DPQSU","collaborationStartDate":null,"retracedRiskScore":"2.31","city":"Olbia","collaborationEndDate":null,"internalCompanyCode":null,"totalUsersCount":0,"activeUsersCount":0,"invitedUsersCount":0,"featuredImageFileUrl":"https://retraced-bucket-production-public.imgix.net/MTZK7H1Q5J4PG3GXK2.png","originalVideoFileUrl":null,"connectionTypeId":"M4MRIN4A9JQ"},{"id":"9VAK4RL9RJX","officialName":"Zhejiang Thermal Drinkware Co., Ltd.","name":"Zhejiang Thermal Drinkware Co., Ltd.","updatedAt":"2026-06-11T06:43:03.797Z","key":"9VAK4RL9RJX","byCompanyId":"M4MRIN4A9JQ","onBehalfOfCompanyId":"M4MRIN4A9JQ","profileType":"ABOUT","count":101,"creationDate":"2026-02-27T08:10:08.090Z","connectionDate":"2026-02-27T08:10:08.090Z","createdAt":"2026-02-27T08:10:08.090Z","createdByImpersonateId":null,"createdByUserId":"1MZFVJVYR63","createdByCompanyId":"M4MRIN4A9JQ","createdByApiKeyId":null,"updatedByImpersonateId":null,"updatedByUserId":"IXKEIR4YEYF","updatedByCompanyId":"M4MRIN4A9JQ","updatedByApiKeyId":null,"facilityProcesses":"ASSEMBLY","relationshipType":null,"imageList":[{"id":"file_JMKNZB1795XQ6","url":"https://retraced-bucket-production-public.imgix.net/file_JMKNZB1795XQ6.png","fileType":"IMAGE"}],"connectionType":"SUPPLIER","supplyChainTier":null,"responsiblePerson":null,"vendors":null,"agents":null,"geojson":"{\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [105, 35]}}","displayName":"Zhejiang Thermal Drinkware Co., Ltd.","transliteratedDisplayName":null,"transliteratedOfficialName":null,"description":null,"country":"CN","countryName":"China","addressLine1":null,"addressLine2":null,"county":null,"zipCode":null,"website":null,"phone":null,"facEmail":null,"companySize":null,"companyType":null,"founded":null,"videoFile":null,"collaborationStatus":null,"collaborationStartDate":null,"retracedRiskScore":"3.53","city":null,"collaborationEndDate":null,"internalCompanyCode":null,"totalUsersCount":0,"activeUsersCount":0,"invitedUsersCount":0,"featuredImageFileUrl":"https://retraced-bucket-production-public.imgix.net/file_JMKNZB1795XQ6.png","originalVideoFileUrl":null,"connectionTypeId":"M4MRIN4A9JQ"}]}}}}}}}},"/api/v2/companies/{id}":{"get":{"tags":["Companies"],"description":"Get company profile by ID. Type can be ABOUT, OTHER_IDS, or OPERATIONAL_METRICS.","parameters":[{"schema":{"default":"ABOUT","type":"string","enum":["ABOUT","OTHER_IDS","OPERATIONAL_METRICS"]},"in":"query","name":"type","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,"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"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateCompletionPercentage":{"type":"number"}},"required":["forCompanyId","byCompanyId","onBehalfOfCompanyId","profileType","data","isConnected","isReverseConnected"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false,"example":{"metadata":{"success":true},"data":{"forCompanyId":"DZLSG27839B","byCompanyId":"M4MRIN4A9JQ","onBehalfOfCompanyId":"M4MRIN4A9JQ","profileType":"ABOUT","data":{"official_name":{"retracedId":"official_name","name":"Official Name","description":"Official Name is the name on the business license(s) associated with the address indicated below.\r\r\n\r\r\nType Not Applicable if there is no English language business license facility name and complete the other question below:\r\r\n\"Facility Name (in local language as per business license):\"","meta":{},"fieldTypeId":"SHORT_TEXT","type":"GLOBAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"string","minLength":1}},"required":["value"]},"externalIds":[{"id":"fp-bi-1","version":"1.4.0","provider":"slcp"}],"sortingId":10,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"official_name","isEditable":false,"isVisible":true,"value":"Developers' Fibre"},"display_name":{"retracedId":"display_name","name":"Display Name","meta":{},"fieldTypeId":"SHORT_TEXT","type":"RELATIONAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"string","minLength":1}},"required":["value"]},"externalIds":[],"sortingId":30,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"display_name","isEditable":true,"isVisible":true,"value":"Developers' Fibre"},"transliterated_display_name":{"retracedId":"transliterated_display_name","name":"Transliterated Display Name","meta":{},"fieldTypeId":"SHORT_TEXT","type":"RELATIONAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"externalIds":[],"sortingId":40,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"transliterated_display_name","isEditable":true,"isVisible":false,"value":null},"transliterated_official_name":{"retracedId":"transliterated_official_name","name":"Transliterated Official Name","meta":{},"fieldTypeId":"SHORT_TEXT","type":"GLOBAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"externalIds":[],"sortingId":50,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"transliterated_official_name","isEditable":false,"isVisible":false,"value":null},"official_name_localized":{"retracedId":"official_name_localized","name":"Official Name Localized","description":"Only applicable if your facility has a name/also has a name in a language other than English.\r\r\n\r\r\nFacility Name is the name on the business license(s) associated with the address indicated below.","meta":{},"fieldTypeId":"SHORT_TEXT","type":"GLOBAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"externalIds":[{"id":"fp-bi-3","version":"1.4.0","provider":"slcp"}],"sortingId":20,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"official_name_localized","isEditable":false,"isVisible":true,"value":null},"internal_company_code":{"retracedId":"internal_company_code","name":"Internal Company Code","description":"You can use this field to store the company ID of your internal systems (e.g SAP ID)","meta":{},"fieldTypeId":"SHORT_TEXT","type":"RELATIONAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"externalIds":[],"sortingId":350,"sectionId":"1.2","impactArea":"Other IDs","impactAreaId":"OTHER_IDS","id":"internal_company_code","isEditable":true,"isVisible":true,"value":"ID-12323423"},"facility_processes":{"retracedId":"facility_processes","name":"Facility Processes","meta":{"asset":"FACILITY_PROCESSES","constantsValidation":true},"fieldTypeId":"MULTI_SELECT","type":"RELATIONAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"array","minItems":1,"items":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]}}},"required":["value"]},"externalIds":[],"sortingId":210,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"facility_processes","isEditable":true,"isVisible":true,"value":[{"id":"FARM"},{"id":"RAW_MATERIAL_PRODUCER"},{"id":"GINNING_MILL"}]},"product_levels":{"retracedId":"product_levels","name":"Product Levels","description":"Select the product levels this company sells","meta":{"asset":"PRODUCT_LEVELS","constantsValidation":true},"fieldTypeId":"MULTI_SELECT","type":"RELATIONAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}},"required":["value"]},"externalIds":[],"sortingId":230,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"product_levels","isEditable":true,"isVisible":true,"value":[{"id":"FABRICS"}]},"product_types":{"retracedId":"product_types","name":"Product Types","description":"Select the product types this company sells","meta":{"asset":"PRODUCT_TYPES","constantsValidation":true},"fieldTypeId":"MULTI_SELECT","type":"RELATIONAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}},"required":["value"]},"externalIds":[],"sortingId":240,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"product_types","isEditable":true,"isVisible":true,"value":[{"id":"WOVEN_FABRIC"},{"id":"NON_WOVEN"}]},"image_list":{"retracedId":"image_list","name":"Image List","meta":{},"fieldTypeId":"MULTIPLE_PHOTO_UPLOAD","type":"RELATIONAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"array"}},"required":["value"]},"externalIds":[],"sortingId":290,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"image_list","isEditable":true,"isVisible":true,"value":[{"id":"G5GFQYDHUHFQFJV1NP","url":"https://retraced-bucket-production-public.imgix.net/G5GFQYDHUHFQFJV1NP.png","fileType":"IMAGE"}]},"description":{"retracedId":"description","name":"Description","meta":{},"fieldTypeId":"LONG_TEXT","type":"RELATIONAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"externalIds":[],"sortingId":60,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"description","isEditable":true,"isVisible":true,"value":"This supplier is an important fiber provider to me"},"country":{"retracedId":"country","name":"Country","description":"Refers to the country or region (e.g. special administrative region) in which the facility is located.","meta":{"asset":"COUNTRIES","constantsValidation":true},"fieldTypeId":"SELECT","type":"GLOBAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"externalIds":[{"id":"fp-bi-7","version":"1.4.0","provider":"slcp"}],"sortingId":120,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"country","isEditable":false,"isVisible":true,"value":"ES"},"country_name":{"retracedId":"country_name","name":"Country Name","sortingId":125,"meta":{},"fieldTypeId":"SHORT_TEXT","type":"GLOBAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"externalIds":[],"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"country_name","isEditable":false,"isVisible":true,"value":"Spain"},"city":{"retracedId":"city","name":"City","description":"Refers to the city name of the address on the business license(s) associated with the facility name.","meta":{},"fieldTypeId":"SHORT_TEXT","type":"GLOBAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"externalIds":[{"id":"fp-bas-2","version":"1.4.0","provider":"slcp"}],"sortingId":100,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"city","isEditable":false,"isVisible":true,"value":null},"county":{"retracedId":"county","name":"County","description":"Refers to the state or province name of the address on the business license(s) associated with the facility name.\r\r\n\r\r\nIf not applicable enter N/A. ","meta":{},"fieldTypeId":"SHORT_TEXT","type":"GLOBAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"externalIds":[{"id":"fp-bas-3","version":"1.4.0","provider":"slcp"}],"sortingId":110,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"county","isEditable":false,"isVisible":true,"value":null},"zip_code":{"retracedId":"zip_code","name":"Zip Code","description":"Refers to the zip code or postal code of the address on the business license(s) associated with the facility name.\r\r\n\r\r\nIf not applicable enter N/A. ","meta":{},"fieldTypeId":"SHORT_TEXT","type":"GLOBAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"externalIds":[{"id":"fp-bas-4","version":"1.4.0","provider":"slcp"}],"sortingId":90,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"zip_code","isEditable":false,"isVisible":true,"value":null},"full_address_localize":{"retracedId":"full_address_localize","name":"Full Address (in local language as per business license):","description":"Only applicable if your facility has an address/also has an address in a language other than English.\r\r\n\r\r\nFacility Address is the address on the business license(s) associated with the facility name. \r\r\n\r\r\nInsert Street, City, State/Province, Zip Code/Postal Code all in one response field. ","meta":{},"fieldTypeId":"LONG_TEXT","type":"GLOBAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"externalIds":[{"id":"fp-bi-4","version":"1.4.0","provider":"slcp"}],"sortingId":140,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"full_address_localize","isEditable":false,"isVisible":true,"value":null},"address_line_1":{"retracedId":"address_line_1","name":"Address Line 1","description":"Refers to the street address on the business license(s) associated with the facility name.","meta":{"slcpMeta":{"key":"fp-bas-1","number":"FP-BAS-1","dataType":"string","masterType":"Question","versionImported":"1.7.0"}},"fieldTypeId":"LONG_TEXT","type":"GLOBAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"externalIds":[{"id":"fp-bas-1","version":"1.7.0","provider":"slcp"}],"sortingId":70,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"address_line_1","isEditable":false,"isVisible":true,"value":null},"address_line_2":{"retracedId":"address_line_2","name":"Address Line 2","meta":{},"fieldTypeId":"LONG_TEXT","type":"GLOBAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"externalIds":[],"sortingId":80,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"address_line_2","isEditable":false,"isVisible":true,"value":null},"phone":{"retracedId":"phone","name":"Phone","description":"General facility phone number, e.g. phone number for general inquiries or to access the staff at reception desk.","meta":{},"fieldTypeId":"SHORT_TEXT","type":"RELATIONAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"string","pattern":"^\\+[1-9]\\d{1,14}$"}},"required":["value"]},"externalIds":[{"id":"fp-bi-16","version":"1.4.0","provider":"slcp"}],"sortingId":180,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"phone","isEditable":true,"isVisible":true,"value":"+3912312312332"},"website":{"retracedId":"website","name":"Website","meta":{},"fieldTypeId":"LONG_TEXT","type":"GLOBAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"externalIds":[],"sortingId":200,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"website","isEditable":false,"isVisible":true,"value":null},"connection_type":{"retracedId":"connection_type","name":"Connection Type","description":"","meta":{},"fieldTypeId":"SELECT","type":"TRANSACTIONAL","options":[{"key":"SUPPLIER","text":"Supplier"},{"key":"CLIENT","text":"Client"}],"schema":{"type":"object","properties":{"value":{"type":"string","enum":["SUPPLIER","CLIENT"]}},"required":["value"]},"externalIds":[],"sortingId":250,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"connection_type","isEditable":true,"isVisible":true,"value":"SUPPLIER"},"relationship_type":{"retracedId":"relationship_type","name":"Relationship Type","meta":{"asset":"RELATIONSHIP_TYPES","constantsValidation":true},"fieldTypeId":"MULTI_SELECT","type":"TRANSACTIONAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}},"required":["value"]},"externalIds":[],"sortingId":260,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"relationship_type","isEditable":true,"isVisible":true,"value":[]},"collaboration_status":{"retracedId":"collaboration_status","name":"Collaboration Status","description":"","meta":{"asset":"COLLABORATION_STATUSES","constantsValidation":true},"fieldTypeId":"SELECT","type":"TRANSACTIONAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"string","minLength":1}},"required":["value"]},"externalIds":[],"sortingId":270,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"collaboration_status","isEditable":true,"isVisible":true,"value":"18XJ0Q9UDGK60SD5BX"},"collaboration_start_date":{"retracedId":"collaboration_start_date","name":"Collaboration Start Date","meta":{},"fieldTypeId":"DATE","type":"TRANSACTIONAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"string","format":"date-time"}},"required":["value"]},"externalIds":[],"sortingId":280,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"collaboration_start_date","isEditable":true,"isVisible":true,"value":"2026-02-03T23:00:00.000Z"},"supply_chain_tier":{"retracedId":"supply_chain_tier","name":"Supply Chain Tier","meta":{},"fieldTypeId":"MULTI_SELECT","type":"TRANSACTIONAL","options":[{"key":"TIER_0","text":"Tier 0"},{"key":"TIER_1","text":"Tier 1"},{"key":"TIER_2","text":"Tier 2"},{"key":"TIER_3","text":"Tier 3"},{"key":"TIER_4","text":"Tier 4"},{"key":"TIER_5","text":"Tier 5"}],"schema":{"type":"object","properties":{"value":{"type":"array","items":{"type":"string","enum":["TIER_0","TIER_1","TIER_2","TIER_3","TIER_4","TIER_5"]}}},"required":["value"]},"externalIds":[],"sortingId":220,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"supply_chain_tier","isEditable":true,"isVisible":true,"value":["TIER_2"]},"geojson":{"retracedId":"geojson","name":"Geojson","meta":{},"fieldTypeId":"ADDRESS","type":"GLOBAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"object","properties":{"type":{"type":"string"},"geometry":{"type":"object","properties":{"type":{"type":"string"},"coordinates":{"type":"array","items":{"type":"number"}}},"required":["type","coordinates"]}},"required":["type","geometry"]}},"required":["value"]},"externalIds":[],"sortingId":150,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"geojson","isEditable":false,"isVisible":true,"value":{"type":"Feature","geometry":{"type":"Point","coordinates":[-4,40]}}},"video_file":{"retracedId":"video_file","name":"Video File","meta":{},"fieldTypeId":"VIDEO_UPLOAD","type":"RELATIONAL","options":[],"schema":{"type":"object","properties":{"value":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"}},"required":["id","url"]},{"type":"object","maxProperties":0}]}},"required":["value"]},"externalIds":[],"sortingId":300,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"video_file","isEditable":true,"isVisible":true,"value":{}},"company_size":{"retracedId":"company_size","name":"Company Size","description":"","meta":{},"fieldTypeId":"SELECT","type":"RELATIONAL","options":[{"key":"FROM_0_TO_1","text":"From 0 to 1"},{"key":"FROM_2_TO_10","text":"From 2 to 10"},{"key":"FROM_11_TO_50","text":"From 11 to 50"},{"key":"FROM_51_TO_200","text":"From 51 to 200"},{"key":"FROM_201_TO_500","text":"From 201 to 500"},{"key":"FROM_501_TO_1000","text":"From 501 to 1000"},{"key":"FROM_1001_TO_5000","text":"From 1001 to 5000"},{"key":"FROM_5001_TO_10000","text":"From 5001 to 10000"},{"key":"FROM_10001_TO_INFINITE","text":"From 10001 to infinite"}],"schema":{"type":"object","properties":{"value":{"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"],"maxLength":255}},"required":["value"]},"externalIds":[],"sortingId":301,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"company_size","isEditable":true,"isVisible":true,"value":"FROM_51_TO_200"},"retraced_risk_score":{"retracedId":"retraced_risk_score","name":"Retraced Risk Score","description":"The Retraced Standard Risk Score is automatically calculated based on the data points that are available to you.","meta":{"tooltip":"This field is automatically filled with risk score calculated based on the retraced standard assessment. Users cannot change this value."},"fieldTypeId":"NUMBER","type":"RELATIONAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"number","minimum":1,"maximum":5}},"required":["value"]},"externalIds":[],"sortingId":55,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"retraced_risk_score","isEditable":true,"isVisible":true,"value":null},"fac_email":{"retracedId":"fac_email","name":"Facility Email:","description":"General facility email to reach the facility with general inquiries. Usually these email addresses are info@... type addresses.","meta":{},"fieldTypeId":"SHORT_TEXT","type":"RELATIONAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"externalIds":[{"id":"fp-bi-17","version":"1.4.0","provider":"slcp"}],"sortingId":190,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"fac_email","isEditable":true,"isVisible":true,"value":"test@devfibre.com"},"collaboration_end_date":{"retracedId":"collaboration_end_date","name":"Collaboration End Date","meta":{},"fieldTypeId":"DATE","type":"TRANSACTIONAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"externalIds":[],"sortingId":281,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"collaboration_end_date","isEditable":true,"isVisible":true,"value":null},"responsible_person":{"retracedId":"responsible_person","name":"Responsible Person","meta":{"asset":"USERS","constantsValidation":true},"fieldTypeId":"MULTI_SELECT","type":"TRANSACTIONAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}},"required":["value"]},"externalIds":[],"sortingId":285,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"responsible_person","isEditable":true,"isVisible":true,"value":[{"id":"XI9MMYMZK7K"}]},"vendors":{"retracedId":"vendors","name":"Vendors","meta":{"asset":"company_links","constantsValidation":true},"fieldTypeId":"MULTI_SELECT","type":"TRANSACTIONAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"array","minItems":1,"items":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]}}},"required":["value"]},"externalIds":[],"sortingId":284,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"vendors","isEditable":true,"isVisible":true,"value":[{"id":"R49SR1AK9BA"}]},"agents":{"retracedId":"agents","name":"Agents","meta":{"asset":"company_links","constantsValidation":true},"fieldTypeId":"MULTI_SELECT","type":"TRANSACTIONAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"array","minItems":1,"items":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]}}},"required":["value"]},"externalIds":[],"sortingId":283,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"agents","isEditable":true,"isVisible":true,"value":[]},"notes":{"retracedId":"notes","name":"Notes","description":"Notes","meta":{},"fieldTypeId":"SHORT_TEXT","type":"RELATIONAL","options":[],"schema":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]},"externalIds":[],"sortingId":100,"sectionId":"1.1","impactArea":"About","impactAreaId":"ABOUT","id":"notes","isEditable":true,"isVisible":true,"value":"Note to team: testing"}},"isConnected":true,"isReverseConnected":true,"createdAt":"2026-06-23T12:13:29.883Z","createdByImpersonateId":null,"createdByUserId":"XI9MMYMZK7K","createdByCompanyId":"M4MRIN4A9JQ","createdByApiKeyId":null,"createdByApiKeyLabel":null,"updatedAt":"2026-06-23T15:17:04.383Z","updatedByImpersonateId":null,"updatedByUserId":"XI9MMYMZK7K","updatedByCompanyId":"M4MRIN4A9JQ","updatedByApiKeyId":null,"updatedByApiKeyLabel":null,"templateCompletionPercentage":67}}}}}},"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"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"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"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"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"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"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"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/v2/companies/{id}/esg/":{"get":{"tags":["Companies"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"name","required":false},{"schema":{"type":"string"},"in":"query","name":"retracedId","required":false},{"schema":{"type":"string"},"in":"query","name":"templateId","required":false},{"schema":{"type":"string"},"in":"query","name":"impactArea","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,"type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"companyId":{"type":"string"},"environmental":{"type":"object","properties":{"sectionId":{"type":"string"},"name":{"type":"string"},"totalDataPoints":{"type":"number"},"answeredDataPoints":{"type":"number"},"dataPoints":{"type":"array","items":{"type":"object","properties":{"retracedId":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"impactArea":{"anyOf":[{"type":"string"},{"type":"null"}]},"impactAreaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"value":{"anyOf":[{},{"type":"null"}]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]},"year":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"null"}]}},"required":["retracedId","name","value"],"additionalProperties":false}}},"required":["sectionId","name","totalDataPoints","answeredDataPoints","dataPoints"],"additionalProperties":false},"social":{"type":"object","properties":{"sectionId":{"type":"string"},"name":{"type":"string"},"totalDataPoints":{"type":"number"},"answeredDataPoints":{"type":"number"},"dataPoints":{"type":"array","items":{"type":"object","properties":{"retracedId":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"impactArea":{"anyOf":[{"type":"string"},{"type":"null"}]},"impactAreaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"value":{"anyOf":[{},{"type":"null"}]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]},"year":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"null"}]}},"required":["retracedId","name","value"],"additionalProperties":false}}},"required":["sectionId","name","totalDataPoints","answeredDataPoints","dataPoints"],"additionalProperties":false},"governance":{"type":"object","properties":{"sectionId":{"type":"string"},"name":{"type":"string"},"totalDataPoints":{"type":"number"},"answeredDataPoints":{"type":"number"},"dataPoints":{"type":"array","items":{"type":"object","properties":{"retracedId":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"impactArea":{"anyOf":[{"type":"string"},{"type":"null"}]},"impactAreaId":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"value":{"anyOf":[{},{"type":"null"}]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]},"year":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"null"}]}},"required":["retracedId","name","value"],"additionalProperties":false}}},"required":["sectionId","name","totalDataPoints","answeredDataPoints","dataPoints"],"additionalProperties":false}},"required":["companyId","environmental","social","governance"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false}}}}}}},"/api/v2/files/":{"post":{"tags":["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,"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":{"anyOf":[{"type":"string","enum":["IMAGE","VIDEO","DOCUMENT"]},{"type":"null"}]},"documentText":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentType":{"anyOf":[{"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"]},{"type":"null"}]},"contentMd5Hash":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileSize":{"anyOf":[{"type":"number"},{"type":"null"}]},"isMigrated":{"anyOf":[{"type":"integer","minimum":0,"maximum":1},{"type":"null"}]},"isPrivate":{"anyOf":[{"type":"integer","minimum":0,"maximum":1},{"type":"null"}]},"uploadUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"originalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"previewUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserName":{"anyOf":[{"type":"string"},{"type":"null"}]},"normalizeAttemptedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"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/v2/attachment-templates/":{"get":{"tags":["Order Hub / 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"]},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"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"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/v2/orders/":{"get":{"tags":["Order Hub / Orders"],"description":"List the current company's orders. Supports filtering by type, supplier, buyer, status, tag, orderNumber, archived flag and updated-time range, plus pagination and sorting. Soft-removed orders are always excluded.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","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","createdAt","orderNumber","orderDate","status"]},"in":"query","name":"sort","required":false},{"schema":{"type":"string"},"in":"query","name":"type","required":false},{"schema":{"type":"string"},"in":"query","name":"supplier","required":false},{"schema":{"type":"string"},"in":"query","name":"buyer","required":false},{"schema":{"type":"string"},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"query","name":"tag","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}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"type":"string"},"orderNumber":{"type":"string"},"orderType":{"anyOf":[{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER","INTERNAL_ORDER"]},{"type":"null"}]},"orderSubType":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"buyerCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"supplierCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"receiverCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"vendorCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"factory":{"anyOf":[{"type":"string"},{"type":"null"}]},"buyerFacilityProcess":{"anyOf":[{"type":"string"},{"type":"null"}]},"supplierFacilityProcess":{"anyOf":[{"type":"string"},{"type":"null"}]},"receiverFacilityProcess":{"anyOf":[{"type":"string"},{"type":"null"}]},"orderDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"deliveryDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"agreedDeliveryDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"expectedShippingDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"expectedDeliveryDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"actualDeliveryDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"shipmentReference":{"anyOf":[{"type":"string"},{"type":"null"}]},"internalResponsiblePerson":{"anyOf":[{"type":"string"},{"type":"null"}]},"season":{"anyOf":[{"type":"string"},{"type":"null"}]},"counterpartyOrderNumberRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"isArchived":{"type":"boolean"},"tracingStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","forCompanyId","orderNumber","orderType","orderSubType","status","tags","source","buyerCompanyId","supplierCompanyId","receiverCompanyId","vendorCompanyId","factory","buyerFacilityProcess","supplierFacilityProcess","receiverFacilityProcess","orderDate","deliveryDate","agreedDeliveryDate","expectedShippingDate","shippingDate","expectedDeliveryDate","actualDeliveryDate","shipmentReference","internalResponsiblePerson","season","counterpartyOrderNumberRef","isArchived","tracingStatus","createdAt","createdByUserId","createdByUserName","createdByCompanyId","createdByCompanyName","createdByImpersonateId","createdByImpersonateName","createdByApiKeyId","createdByApiKeyLabel","updatedAt","updatedByUserId","updatedByUserName","updatedByCompanyId","updatedByCompanyName","updatedByImpersonateId","updatedByImpersonateName","updatedByApiKeyId","updatedByApiKeyLabel"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false,"example":{"metadata":{"success":true,"pagination":{"page":1,"limit":20,"total":2,"totalPages":1}},"data":[{"id":"order_01KWHF7TD318JZA3KM9A9E9979","forCompanyId":"M4MRIN4A9JQ","orderNumber":"PO-2026-0042","orderType":"PURCHASE_ORDER","orderSubType":"STANDARD","status":"IN_PROGRESS","tags":["priority"],"source":"ERP","buyerCompanyId":"M4MRIN4A9JQ","supplierCompanyId":"4ZGRBDHXAF5","receiverCompanyId":"4N3TWW6BVA8","vendorCompanyId":"4NX1XA2LARR","factory":"41FP5A2HJPX","buyerFacilityProcess":"Quality inspection","supplierFacilityProcess":"Weaving","receiverFacilityProcess":"Washing & finishing","orderDate":"2026-07-01","deliveryDate":"2026-09-15","agreedDeliveryDate":"2026-09-10","expectedShippingDate":"2026-08-28","shippingDate":"2026-08-30","expectedDeliveryDate":"2026-09-15","actualDeliveryDate":null,"shipmentReference":"SHIP-2026-0042","internalResponsiblePerson":"KP1A1AILVU3","season":"FW26","counterpartyOrderNumberRef":"WW-SO-2026-118","isArchived":false,"tracingStatus":null,"createdAt":"2026-07-02T12:48:40.563Z","createdByUserId":null,"createdByUserName":null,"createdByCompanyId":"M4MRIN4A9JQ","createdByCompanyName":null,"createdByImpersonateId":null,"createdByImpersonateName":null,"createdByApiKeyId":"QLKL2SWPRSH","createdByApiKeyLabel":"ERP integration","updatedAt":"2026-07-02T12:48:40.563Z","updatedByUserId":null,"updatedByUserName":null,"updatedByCompanyId":"M4MRIN4A9JQ","updatedByCompanyName":null,"updatedByImpersonateId":null,"updatedByImpersonateName":null,"updatedByApiKeyId":"QLKL2SWPRSH","updatedByApiKeyLabel":"ERP integration"},{"id":"order_01KWHF7VW17Z89RDBEFVK4M8X8","forCompanyId":"M4MRIN4A9JQ","orderNumber":"SO-2026-0107","orderType":"SALES_ORDER","orderSubType":"REPEAT","status":"IN_REVIEW","tags":[],"source":"Manual","buyerCompanyId":"JCPAGPS53CQ","supplierCompanyId":"M4MRIN4A9JQ","receiverCompanyId":"JCPAGPS53CQ","vendorCompanyId":null,"factory":"41FP5A2HJPX","buyerFacilityProcess":"Goods receipt","supplierFacilityProcess":"Cut-make-trim","receiverFacilityProcess":null,"orderDate":"2026-06-20","deliveryDate":"2026-08-30","agreedDeliveryDate":"2026-08-30","expectedShippingDate":"2026-08-18","shippingDate":null,"expectedDeliveryDate":"2026-08-30","actualDeliveryDate":null,"shipmentReference":"SHIP-4471","internalResponsiblePerson":"TBR6IG6HV9R","season":"SS26","counterpartyOrderNumberRef":"WW-PO-88121","isArchived":false,"tracingStatus":null,"createdAt":"2026-07-02T12:49:08.050Z","createdByUserId":null,"createdByUserName":null,"createdByCompanyId":"M4MRIN4A9JQ","createdByCompanyName":null,"createdByImpersonateId":null,"createdByImpersonateName":null,"createdByApiKeyId":"QLKL2SWPRSH","createdByApiKeyLabel":"ERP integration","updatedAt":"2026-07-02T12:49:08.050Z","updatedByUserId":null,"updatedByUserName":null,"updatedByCompanyId":"M4MRIN4A9JQ","updatedByCompanyName":null,"updatedByImpersonateId":null,"updatedByImpersonateName":null,"updatedByApiKeyId":"QLKL2SWPRSH","updatedByApiKeyLabel":"ERP integration"}]}}}}},"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"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"post":{"tags":["Order Hub / 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":{"type":"string","maxLength":255},"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":{"format":"date","type":"string","example":"2026-07-21"},"deliveryDate":{"format":"date","type":"string","example":"2026-07-21"},"agreedDeliveryDate":{"format":"date","type":"string","example":"2026-07-21"},"expectedShippingDate":{"format":"date","type":"string","example":"2026-07-21"},"shippingDate":{"format":"date","type":"string","example":"2026-07-21"},"expectedDeliveryDate":{"format":"date","type":"string","example":"2026-07-21"},"actualDeliveryDate":{"format":"date","type":"string","example":"2026-07-21"},"shipmentReference":{"type":"string","maxLength":255},"internalResponsiblePerson":{"type":"string","maxLength":255},"season":{"type":"string"},"counterpartyOrderNumberRef":{"type":"string"},"orderType":{"anyOf":[{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER","INTERNAL_ORDER"]},{"type":"null"}]},"tracingStatus":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"isArchived":{"type":"boolean"},"lines":{"type":"array","items":{"type":"object","properties":{"orderLineNumber":{"type":"string","minLength":1,"maxLength":255},"styleId":{"type":"string","minLength":1,"maxLength":36},"quantity":{"type":"number","exclusiveMinimum":0,"exclusiveMaximum":100000000000000000},"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","exclusiveMinimum":0,"exclusiveMaximum":100000000000000000},"secondaryUnit":{"type":"string","enum":["KILOGRAM"]}},"required":["styleId","quantity","unit"],"additionalProperties":false}}},"required":["orderNumber","buyerCompanyId","supplierCompanyId"],"additionalProperties":false,"example":{"orderNumber":"PO-2026-0042","status":"IN_PROGRESS","orderSubType":"STANDARD","source":"ERP","tags":["priority"],"buyerCompanyId":"M4MRIN4A9JQ","supplierCompanyId":"4ZGRBDHXAF5","receiverCompanyId":"4N3TWW6BVA8","vendorCompanyId":"4NX1XA2LARR","factory":"41FP5A2HJPX","buyerFacilityProcess":"Quality inspection","supplierFacilityProcess":"Weaving","receiverFacilityProcess":"Washing & finishing","orderDate":"2026-07-01","deliveryDate":"2026-09-15","agreedDeliveryDate":"2026-09-10","expectedShippingDate":"2026-08-28","shippingDate":"2026-08-30","expectedDeliveryDate":"2026-09-15","shipmentReference":"SHIP-2026-0042","internalResponsiblePerson":"KP1A1AILVU3","season":"FW26","counterpartyOrderNumberRef":"WW-SO-2026-118","lines":[{"orderLineNumber":"PO-2026-0042-PACKAGING","styleId":"style_01KM3A0QDRW7HRT0KZ8FQPXV6E","quantity":300,"unit":"PIECES","secondaryQuantity":120.5,"secondaryUnit":"KILOGRAM"}]}},"examples":{"default":{"summary":"Example request","value":{"orderNumber":"PO-2026-0042","status":"IN_PROGRESS","orderSubType":"STANDARD","source":"ERP","tags":["priority"],"buyerCompanyId":"M4MRIN4A9JQ","supplierCompanyId":"4ZGRBDHXAF5","receiverCompanyId":"4N3TWW6BVA8","vendorCompanyId":"4NX1XA2LARR","factory":"41FP5A2HJPX","buyerFacilityProcess":"Quality inspection","supplierFacilityProcess":"Weaving","receiverFacilityProcess":"Washing & finishing","orderDate":"2026-07-01","deliveryDate":"2026-09-15","agreedDeliveryDate":"2026-09-10","expectedShippingDate":"2026-08-28","shippingDate":"2026-08-30","expectedDeliveryDate":"2026-09-15","shipmentReference":"SHIP-2026-0042","internalResponsiblePerson":"KP1A1AILVU3","season":"FW26","counterpartyOrderNumberRef":"WW-SO-2026-118","lines":[{"orderLineNumber":"PO-2026-0042-PACKAGING","styleId":"style_01KM3A0QDRW7HRT0KZ8FQPXV6E","quantity":300,"unit":"PIECES","secondaryQuantity":120.5,"secondaryUnit":"KILOGRAM"}]}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"type":"string"},"orderNumber":{"type":"string"},"orderType":{"anyOf":[{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER","INTERNAL_ORDER"]},{"type":"null"}]},"orderSubType":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"buyerCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"supplierCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"receiverCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"vendorCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"factory":{"anyOf":[{"type":"string"},{"type":"null"}]},"buyerFacilityProcess":{"anyOf":[{"type":"string"},{"type":"null"}]},"supplierFacilityProcess":{"anyOf":[{"type":"string"},{"type":"null"}]},"receiverFacilityProcess":{"anyOf":[{"type":"string"},{"type":"null"}]},"orderDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"deliveryDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"agreedDeliveryDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"expectedShippingDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"expectedDeliveryDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"actualDeliveryDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"shipmentReference":{"anyOf":[{"type":"string"},{"type":"null"}]},"internalResponsiblePerson":{"anyOf":[{"type":"string"},{"type":"null"}]},"season":{"anyOf":[{"type":"string"},{"type":"null"}]},"counterpartyOrderNumberRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"isArchived":{"type":"boolean"},"tracingStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","forCompanyId","orderNumber","orderType","orderSubType","status","tags","source","buyerCompanyId","supplierCompanyId","receiverCompanyId","vendorCompanyId","factory","buyerFacilityProcess","supplierFacilityProcess","receiverFacilityProcess","orderDate","deliveryDate","agreedDeliveryDate","expectedShippingDate","shippingDate","expectedDeliveryDate","actualDeliveryDate","shipmentReference","internalResponsiblePerson","season","counterpartyOrderNumberRef","isArchived","tracingStatus","createdAt","createdByUserId","createdByUserName","createdByCompanyId","createdByCompanyName","createdByImpersonateId","createdByImpersonateName","createdByApiKeyId","createdByApiKeyLabel","updatedAt","updatedByUserId","updatedByUserName","updatedByCompanyId","updatedByCompanyName","updatedByImpersonateId","updatedByImpersonateName","updatedByApiKeyId","updatedByApiKeyLabel"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false,"example":{"metadata":{"success":true},"data":{"id":"order_01KWHF7TD318JZA3KM9A9E9979","forCompanyId":"M4MRIN4A9JQ","orderNumber":"PO-2026-0042","orderType":"PURCHASE_ORDER","orderSubType":"STANDARD","status":"IN_PROGRESS","tags":["priority"],"source":"ERP","buyerCompanyId":"M4MRIN4A9JQ","supplierCompanyId":"4ZGRBDHXAF5","receiverCompanyId":"4N3TWW6BVA8","vendorCompanyId":"4NX1XA2LARR","factory":"41FP5A2HJPX","buyerFacilityProcess":"Quality inspection","supplierFacilityProcess":"Weaving","receiverFacilityProcess":"Washing & finishing","orderDate":"2026-07-01","deliveryDate":"2026-09-15","agreedDeliveryDate":"2026-09-10","expectedShippingDate":"2026-08-28","shippingDate":"2026-08-30","expectedDeliveryDate":"2026-09-15","actualDeliveryDate":null,"shipmentReference":"SHIP-2026-0042","internalResponsiblePerson":"KP1A1AILVU3","season":"FW26","counterpartyOrderNumberRef":"WW-SO-2026-118","isArchived":false,"tracingStatus":null,"createdAt":"2026-07-02T12:48:40.563Z","createdByUserId":null,"createdByUserName":null,"createdByCompanyId":"M4MRIN4A9JQ","createdByCompanyName":null,"createdByImpersonateId":null,"createdByImpersonateName":null,"createdByApiKeyId":"QLKL2SWPRSH","createdByApiKeyLabel":"ERP integration","updatedAt":"2026-07-02T12:48:40.563Z","updatedByUserId":null,"updatedByUserName":null,"updatedByCompanyId":"M4MRIN4A9JQ","updatedByCompanyName":null,"updatedByImpersonateId":null,"updatedByImpersonateName":null,"updatedByApiKeyId":"QLKL2SWPRSH","updatedByApiKeyLabel":"ERP integration"}}}}}},"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"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"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"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"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"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/v2/orders/{id}":{"get":{"tags":["Order Hub / 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,"type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"type":"string"},"orderNumber":{"type":"string"},"orderType":{"anyOf":[{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER","INTERNAL_ORDER"]},{"type":"null"}]},"orderSubType":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"buyerCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"supplierCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"receiverCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"vendorCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"factory":{"anyOf":[{"type":"string"},{"type":"null"}]},"buyerFacilityProcess":{"anyOf":[{"type":"string"},{"type":"null"}]},"supplierFacilityProcess":{"anyOf":[{"type":"string"},{"type":"null"}]},"receiverFacilityProcess":{"anyOf":[{"type":"string"},{"type":"null"}]},"orderDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"deliveryDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"agreedDeliveryDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"expectedShippingDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"expectedDeliveryDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"actualDeliveryDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"shipmentReference":{"anyOf":[{"type":"string"},{"type":"null"}]},"internalResponsiblePerson":{"anyOf":[{"type":"string"},{"type":"null"}]},"season":{"anyOf":[{"type":"string"},{"type":"null"}]},"counterpartyOrderNumberRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"isArchived":{"type":"boolean"},"tracingStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","forCompanyId","orderNumber","orderType","orderSubType","status","tags","source","buyerCompanyId","supplierCompanyId","receiverCompanyId","vendorCompanyId","factory","buyerFacilityProcess","supplierFacilityProcess","receiverFacilityProcess","orderDate","deliveryDate","agreedDeliveryDate","expectedShippingDate","shippingDate","expectedDeliveryDate","actualDeliveryDate","shipmentReference","internalResponsiblePerson","season","counterpartyOrderNumberRef","isArchived","tracingStatus","createdAt","createdByUserId","createdByUserName","createdByCompanyId","createdByCompanyName","createdByImpersonateId","createdByImpersonateName","createdByApiKeyId","createdByApiKeyLabel","updatedAt","updatedByUserId","updatedByUserName","updatedByCompanyId","updatedByCompanyName","updatedByImpersonateId","updatedByImpersonateName","updatedByApiKeyId","updatedByApiKeyLabel"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false,"example":{"metadata":{"success":true},"data":{"id":"order_01KWHF7TD318JZA3KM9A9E9979","forCompanyId":"M4MRIN4A9JQ","orderNumber":"PO-2026-0042","orderType":"PURCHASE_ORDER","orderSubType":"STANDARD","status":"IN_PROGRESS","tags":["priority"],"source":"ERP","buyerCompanyId":"M4MRIN4A9JQ","supplierCompanyId":"4ZGRBDHXAF5","receiverCompanyId":"4N3TWW6BVA8","vendorCompanyId":"4NX1XA2LARR","factory":"41FP5A2HJPX","buyerFacilityProcess":"Quality inspection","supplierFacilityProcess":"Weaving","receiverFacilityProcess":"Washing & finishing","orderDate":"2026-07-01","deliveryDate":"2026-09-15","agreedDeliveryDate":"2026-09-10","expectedShippingDate":"2026-08-28","shippingDate":"2026-08-30","expectedDeliveryDate":"2026-09-15","actualDeliveryDate":null,"shipmentReference":"SHIP-2026-0042","internalResponsiblePerson":"KP1A1AILVU3","season":"FW26","counterpartyOrderNumberRef":"WW-SO-2026-118","isArchived":false,"tracingStatus":null,"createdAt":"2026-07-02T12:48:40.563Z","createdByUserId":null,"createdByUserName":null,"createdByCompanyId":"M4MRIN4A9JQ","createdByCompanyName":null,"createdByImpersonateId":null,"createdByImpersonateName":null,"createdByApiKeyId":"QLKL2SWPRSH","createdByApiKeyLabel":"ERP integration","updatedAt":"2026-07-02T12:48:40.563Z","updatedByUserId":null,"updatedByUserName":null,"updatedByCompanyId":"M4MRIN4A9JQ","updatedByCompanyName":null,"updatedByImpersonateId":null,"updatedByImpersonateName":null,"updatedByApiKeyId":"QLKL2SWPRSH","updatedByApiKeyLabel":"ERP integration"}}}}}},"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"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"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"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"patch":{"tags":["Order Hub / 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":{"anyOf":[{"type":"string","enum":["STANDARD","REPEAT","COMMIT","SAMPLE","EXTRACTION_SPLIT"]},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["IN_PROGRESS","IN_REVIEW","COMPLETED"]},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"source":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"buyerCompanyId":{"type":"string","minLength":1,"maxLength":36},"supplierCompanyId":{"type":"string","minLength":1,"maxLength":36},"receiverCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"vendorCompanyId":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"factory":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}]},"buyerFacilityProcess":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"supplierFacilityProcess":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"receiverFacilityProcess":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"orderDate":{"anyOf":[{"format":"date","examples":["2026-07-21"],"type":"string"},{"type":"null"}]},"deliveryDate":{"anyOf":[{"format":"date","examples":["2026-07-21"],"type":"string"},{"type":"null"}]},"agreedDeliveryDate":{"anyOf":[{"format":"date","examples":["2026-07-21"],"type":"string"},{"type":"null"}]},"expectedShippingDate":{"anyOf":[{"format":"date","examples":["2026-07-21"],"type":"string"},{"type":"null"}]},"shippingDate":{"anyOf":[{"format":"date","examples":["2026-07-21"],"type":"string"},{"type":"null"}]},"expectedDeliveryDate":{"anyOf":[{"format":"date","examples":["2026-07-21"],"type":"string"},{"type":"null"}]},"actualDeliveryDate":{"anyOf":[{"format":"date","examples":["2026-07-21"],"type":"string"},{"type":"null"}]},"shipmentReference":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"internalResponsiblePerson":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"season":{"anyOf":[{"type":"string"},{"type":"null"}]},"counterpartyOrderNumberRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"orderType":{"anyOf":[{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER","INTERNAL_ORDER"]},{"type":"null"}]},"tracingStatus":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"isArchived":{"type":"boolean"},"lines":{"type":"array","items":{"type":"object","properties":{"orderLineNumber":{"type":"string","minLength":1,"maxLength":255},"styleId":{"type":"string","minLength":1,"maxLength":36},"quantity":{"type":"number","exclusiveMinimum":0,"exclusiveMaximum":100000000000000000},"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":{"anyOf":[{"type":"number","exclusiveMinimum":0,"exclusiveMaximum":100000000000000000},{"type":"null"}]},"secondaryUnit":{"anyOf":[{"type":"string","enum":["KILOGRAM"]},{"type":"null"}]},"id":{"type":"string","minLength":1,"maxLength":36}},"additionalProperties":false}}},"additionalProperties":false,"example":{"status":"COMPLETED","actualDeliveryDate":"2026-09-12","season":null}},"examples":{"default":{"summary":"Example request","value":{"status":"COMPLETED","actualDeliveryDate":"2026-09-12","season":null}}}}}},"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,"type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"forCompanyId":{"type":"string"},"orderNumber":{"type":"string"},"orderType":{"anyOf":[{"type":"string","enum":["PURCHASE_ORDER","SALES_ORDER","INTERNAL_ORDER"]},{"type":"null"}]},"orderSubType":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"buyerCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"supplierCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"receiverCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"vendorCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"factory":{"anyOf":[{"type":"string"},{"type":"null"}]},"buyerFacilityProcess":{"anyOf":[{"type":"string"},{"type":"null"}]},"supplierFacilityProcess":{"anyOf":[{"type":"string"},{"type":"null"}]},"receiverFacilityProcess":{"anyOf":[{"type":"string"},{"type":"null"}]},"orderDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"deliveryDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"agreedDeliveryDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"expectedShippingDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"shippingDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"expectedDeliveryDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"actualDeliveryDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"shipmentReference":{"anyOf":[{"type":"string"},{"type":"null"}]},"internalResponsiblePerson":{"anyOf":[{"type":"string"},{"type":"null"}]},"season":{"anyOf":[{"type":"string"},{"type":"null"}]},"counterpartyOrderNumberRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"isArchived":{"type":"boolean"},"tracingStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","forCompanyId","orderNumber","orderType","orderSubType","status","tags","source","buyerCompanyId","supplierCompanyId","receiverCompanyId","vendorCompanyId","factory","buyerFacilityProcess","supplierFacilityProcess","receiverFacilityProcess","orderDate","deliveryDate","agreedDeliveryDate","expectedShippingDate","shippingDate","expectedDeliveryDate","actualDeliveryDate","shipmentReference","internalResponsiblePerson","season","counterpartyOrderNumberRef","isArchived","tracingStatus","createdAt","createdByUserId","createdByUserName","createdByCompanyId","createdByCompanyName","createdByImpersonateId","createdByImpersonateName","createdByApiKeyId","createdByApiKeyLabel","updatedAt","updatedByUserId","updatedByUserName","updatedByCompanyId","updatedByCompanyName","updatedByImpersonateId","updatedByImpersonateName","updatedByApiKeyId","updatedByApiKeyLabel"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false,"example":{"metadata":{"success":true},"data":{"id":"order_01KWHF7TD318JZA3KM9A9E9979","forCompanyId":"M4MRIN4A9JQ","orderNumber":"PO-2026-0042","orderType":"PURCHASE_ORDER","orderSubType":"STANDARD","status":"COMPLETED","tags":["priority"],"source":"ERP","buyerCompanyId":"M4MRIN4A9JQ","supplierCompanyId":"4ZGRBDHXAF5","receiverCompanyId":"4N3TWW6BVA8","vendorCompanyId":"4NX1XA2LARR","factory":"41FP5A2HJPX","buyerFacilityProcess":"Quality inspection","supplierFacilityProcess":"Weaving","receiverFacilityProcess":"Washing & finishing","orderDate":"2026-07-01","deliveryDate":"2026-09-15","agreedDeliveryDate":"2026-09-10","expectedShippingDate":"2026-08-28","shippingDate":"2026-08-30","expectedDeliveryDate":"2026-09-15","actualDeliveryDate":"2026-09-12","shipmentReference":"SHIP-2026-0042","internalResponsiblePerson":"KP1A1AILVU3","season":null,"counterpartyOrderNumberRef":"WW-SO-2026-118","isArchived":false,"tracingStatus":null,"createdAt":"2026-07-02T12:48:40.563Z","createdByUserId":null,"createdByUserName":null,"createdByCompanyId":"M4MRIN4A9JQ","createdByCompanyName":null,"createdByImpersonateId":null,"createdByImpersonateName":null,"createdByApiKeyId":"QLKL2SWPRSH","createdByApiKeyLabel":"ERP integration","updatedAt":"2026-07-02T12:49:08.497Z","updatedByUserId":null,"updatedByUserName":null,"updatedByCompanyId":"M4MRIN4A9JQ","updatedByCompanyName":null,"updatedByImpersonateId":null,"updatedByImpersonateName":null,"updatedByApiKeyId":null,"updatedByApiKeyLabel":null}}}}}},"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"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"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"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"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"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}},"delete":{"tags":["Order Hub / 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"},"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"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"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"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/v2/order-lines/":{"get":{"tags":["Order Hub / Order Lines"],"description":"List order lines, paginated via `page`/`limit`. Provide `orderId` to filter to a single order; omit it to list every line your company owns. Lines of removed or foreign orders are never returned.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"orderId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"success":{"default":true,"type":"boolean"},"pagination":{"type":"object","properties":{"page":{"default":1,"type":"number"},"limit":{"default":10,"type":"number"},"total":{"default":0,"type":"number"},"totalPages":{"default":0,"type":"number"}},"required":["page","limit","total","totalPages"],"additionalProperties":false}},"required":["success"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"orderLineNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"lineNo":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"styleId":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"secondaryQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"secondaryUnit":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]}},"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"],"additionalProperties":false}}},"required":["metadata","data"],"additionalProperties":false,"example":{"metadata":{"success":true,"pagination":{"page":1,"limit":20,"total":2,"totalPages":1}},"data":[{"id":"ordline_01KWHF7XAY4Q74CAVXYAPJ6FJV","orderId":"order_01KWHF7TD318JZA3KM9A9E9979","orderLineNumber":"PO-2026-0042-L1","lineNo":1,"styleId":"style_01KM2XVHS8NCPRP3PD5EREZ30H","quantity":1500,"unit":"PIECES","secondaryQuantity":450.75,"secondaryUnit":"KILOGRAM","createdAt":"2026-07-02T12:50:08.096Z","createdByUserId":null,"createdByUserName":null,"createdByCompanyId":"M4MRIN4A9JQ","createdByCompanyName":null,"createdByImpersonateId":null,"createdByImpersonateName":null,"createdByApiKeyId":"QLKL2SWPRSH","createdByApiKeyLabel":"ERP integration","updatedAt":"2026-07-02T12:50:08.096Z","updatedByUserId":null,"updatedByUserName":null,"updatedByCompanyId":"M4MRIN4A9JQ","updatedByCompanyName":null,"updatedByImpersonateId":null,"updatedByImpersonateName":null,"updatedByApiKeyId":"QLKL2SWPRSH","updatedByApiKeyLabel":"ERP integration"},{"id":"ordline_01KWHF7YSW1A1R34E1DMEHMAK5","orderId":"order_01KWHF7TD318JZA3KM9A9E9979","orderLineNumber":"PO-2026-0042-FABRIC-A","lineNo":2,"styleId":"style_01KVT1Y6QSRSF7WSEK8QQVRAZ2","quantity":850.5,"unit":"METRE","secondaryQuantity":320.25,"secondaryUnit":"KILOGRAM","createdAt":"2026-07-02T12:50:08.402Z","createdByUserId":null,"createdByUserName":null,"createdByCompanyId":"M4MRIN4A9JQ","createdByCompanyName":null,"createdByImpersonateId":null,"createdByImpersonateName":null,"createdByApiKeyId":"QLKL2SWPRSH","createdByApiKeyLabel":"ERP integration","updatedAt":"2026-07-02T12:50:08.402Z","updatedByUserId":null,"updatedByUserName":null,"updatedByCompanyId":"M4MRIN4A9JQ","updatedByCompanyName":null,"updatedByImpersonateId":null,"updatedByImpersonateName":null,"updatedByApiKeyId":"QLKL2SWPRSH","updatedByApiKeyLabel":"ERP integration"}]}}}}},"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"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/v2/order-lines/{lineId}":{"get":{"tags":["Order Hub / Order Lines"],"description":"Fetch a single order line by its id. Returns 404 when the line does not exist or its parent order is removed / belongs to another 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,"type":"boolean"}},"required":["success"],"additionalProperties":false},"data":{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"orderLineNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"lineNo":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"styleId":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"secondaryQuantity":{"anyOf":[{"type":"number"},{"type":"null"}]},"secondaryUnit":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByCompanyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByImpersonateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByCompanyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByImpersonateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByApiKeyLabel":{"anyOf":[{"type":"string"},{"type":"null"}]}},"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"],"additionalProperties":false}},"required":["metadata","data"],"additionalProperties":false,"example":{"metadata":{"success":true},"data":{"id":"ordline_01KWHF7XAY4Q74CAVXYAPJ6FJV","orderId":"order_01KWHF7TD318JZA3KM9A9E9979","orderLineNumber":"PO-2026-0042-L1","lineNo":1,"styleId":"style_01KM2XVHS8NCPRP3PD5EREZ30H","quantity":1500,"unit":"PIECES","secondaryQuantity":450.75,"secondaryUnit":"KILOGRAM","createdAt":"2026-07-02T12:50:08.096Z","createdByUserId":null,"createdByUserName":null,"createdByCompanyId":"M4MRIN4A9JQ","createdByCompanyName":null,"createdByImpersonateId":null,"createdByImpersonateName":null,"createdByApiKeyId":"QLKL2SWPRSH","createdByApiKeyLabel":"ERP integration","updatedAt":"2026-07-02T12:50:08.096Z","updatedByUserId":null,"updatedByUserName":null,"updatedByCompanyId":"M4MRIN4A9JQ","updatedByCompanyName":null,"updatedByImpersonateId":null,"updatedByImpersonateName":null,"updatedByApiKeyId":"QLKL2SWPRSH","updatedByApiKeyLabel":"ERP integration"}}}}}},"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"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"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"},"code":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"},"expected":{"type":"boolean"}},"required":["statusCode","code","message"],"additionalProperties":false}}}}}}},"/api/v2/guides":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/api/v2/release-notes":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/api/v2/guides/products":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/api/v2/guides/lca-provider":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/api/v2/guides/dpp-label-provider":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/api/v2/guides/bom":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/api/v2/guides/materials":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/api/v2/guides/file-upload":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/api/v2/guides/order-hub":{"get":{"responses":{"200":{"description":"Default Response"}}}}},"servers":[]}