{"openapi":"3.0.1","info":{"title":"Public API sync","description":"To interact with papi sync service.\n <b><h1>Deprecated endpoints:</h1></b><table border=\"1px;\"><tr><th style=\"text-align: center; vertical-align: middle;\"><b><h3>Uri</b></h3></th><th><b>Method</b></th><th><b><h3>Since</h3></b></th><th><b><h3>End of life</h3></b></th></tr></table>","version":"1-core"},"servers":[{"url":"api.test.bluestonepim.com/papi-sync","description":"default"}],"tags":[{"name":"Session sync","description":"To manage sync session."},{"name":"Products","description":"To interact with products."},{"name":"Categories","description":"To interact with categories."},{"name":"Session report","description":"To interact session report."},{"name":"Organization","description":"Controller to remove organization data."}],"paths":{"/session/{id}/done":{"put":{"tags":["Session sync"],"summary":"Close session.","description":"Despite the name, this is what actually starts the sync — it does not just close the session for bookkeeping. Call it once all products have been added with add_products_to_publish_session; it stops accepting further additions and schedules the session to be processed asynchronously. The session must currently be CREATED (i.e. not already closed, cancelled or finished). Poll get_publish_session for progress and get_publish_session_report once it reaches a terminal status.","operationId":"closeSession","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found\n\nThis response indicates that the requested resource could not be found on the server. It typically occurs when no resource matches the requested URI, or the resource identifier used in the request does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"PRODUCTS","accessType":"PUBLISH"}],"security":[{"oauth2":[]}]}},"/session/{id}/cancel":{"put":{"tags":["Session sync"],"summary":"Cancel session.","operationId":"cancelSession","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found\n\nThis response indicates that the requested resource could not be found on the server. It typically occurs when no resource matches the requested URI, or the resource identifier used in the request does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict\n\nThis response indicates that the request could not be completed due to a conflict with the current state of the target resource. This typically occurs when there are duplicate entries or other data conflicts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"PRODUCTS","accessType":"PUBLISH"}],"security":[{"oauth2":[]}]}},"/session/{id}/report/products/file":{"post":{"tags":["Session report"],"summary":"Create products report file.","operationId":"createSessionReportProductsFile","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionReportRequest"}}},"required":true},"responses":{"204":{"description":"No Content","content":{}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found\n\nThis response indicates that the requested resource could not be found on the server. It typically occurs when no resource matches the requested URI, or the resource identifier used in the request does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict\n\nThis response indicates that the request could not be completed due to a conflict with the current state of the target resource. This typically occurs when there are duplicate entries or other data conflicts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"PRODUCTS","accessType":"PUBLISH"}],"security":[{"oauth2":[]}]}},"/session/{id}/report/issues/products/cursor":{"post":{"tags":["Session report"],"summary":"Get products by issue type for the session.","operationId":"getProductIdsByIssueType","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductsByIssueTypeCursorRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductsByIssueTypeCursorResponse"}}}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found\n\nThis response indicates that the requested resource could not be found on the server. It typically occurs when no resource matches the requested URI, or the resource identifier used in the request does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"PRODUCTS","accessType":"PUBLISH"}],"security":[{"oauth2":[]}]}},"/session/{id}/report/issues/assets/cursor":{"post":{"tags":["Session report"],"summary":"Get assets by issue type for the session.","operationId":"getAssetIdsByIssueType","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetsByIssueTypeCursorRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetsByIssueTypeCursorResponse"}}}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found\n\nThis response indicates that the requested resource could not be found on the server. It typically occurs when no resource matches the requested URI, or the resource identifier used in the request does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"PRODUCTS","accessType":"PUBLISH"}],"security":[{"oauth2":[]}]}},"/session/{id}/report/entities/file":{"post":{"tags":["Session report"],"summary":"Create entities report file.","operationId":"createSessionReportFile","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionReportRequest"}}},"required":true},"responses":{"204":{"description":"No Content","content":{}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found\n\nThis response indicates that the requested resource could not be found on the server. It typically occurs when no resource matches the requested URI, or the resource identifier used in the request does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict\n\nThis response indicates that the request could not be completed due to a conflict with the current state of the target resource. This typically occurs when there are duplicate entries or other data conflicts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"PRODUCTS","accessType":"PUBLISH"}],"security":[{"oauth2":[]}]}},"/session/{id}/report/assets/file":{"post":{"tags":["Session report"],"summary":"Create assets report file.","operationId":"createSessionReportAssetFile","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionReportRequest"}}},"required":true},"responses":{"204":{"description":"No Content","content":{}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found\n\nThis response indicates that the requested resource could not be found on the server. It typically occurs when no resource matches the requested URI, or the resource identifier used in the request does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict\n\nThis response indicates that the request could not be completed due to a conflict with the current state of the target resource. This typically occurs when there are duplicate entries or other data conflicts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"PRODUCTS","accessType":"PUBLISH"}],"security":[{"oauth2":[]}]}},"/session/{id}/products":{"post":{"tags":["Session sync"],"summary":"Add products to session.","description":"Queues products to be synced once the session is closed with complete_publish_session. Call this as many times as needed (each call holds at most 100 products) while the session is still CREATED; it fails once the session has been closed, cancelled, or has finished.","operationId":"addProductsToSession","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddProductsToSessionRequest"}}},"required":true},"responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found\n\nThis response indicates that the requested resource could not be found on the server. It typically occurs when no resource matches the requested URI, or the resource identifier used in the request does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"PRODUCTS","accessType":"PUBLISH"}],"security":[{"oauth2":[]}]}},"/session":{"post":{"tags":["Session sync"],"summary":"Create a new sync session.","description":"Creates an empty session that acts as a container for one publish/unpublish run, scoped to the given contexts. It does not accept product ids or start syncing by itself: add products with add_products_to_publish_session, then call complete_publish_session (PUT /session/{id}/done) to start processing them. Fails if the organization already has too many sessions pending at once — finish or cancel older sessions before creating new ones.","operationId":"createSession","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncSessionRequest"}}},"required":true},"responses":{"201":{"description":"Created","headers":{"Location":{"description":" Location URI (Uniform Resource Identifier). This field is the URI of the newly created resource.\n","schema":{"type":"string","example":"location: https://domain.com/.../66d0228066f7c16ce825e2d0"}},"Resource-Id":{"description":"  Entity ID. The unique ID of the newly created resource.\n","schema":{"type":"string","example":"resource-id: 664cc80da825236207fe01a7"}}}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"PRODUCTS","accessType":"PUBLISH"}],"security":[{"oauth2":[]}]}},"/product/state/list/by-ids":{"post":{"tags":["Products"],"summary":"List product states.","operationId":"searchProductStateByIds","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductStateSearchListRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductStateSearchListResponse"}}}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"PRODUCTS","accessType":"LIST"}],"security":[{"oauth2":[]}]}},"/product/state":{"post":{"tags":["Products"],"summary":"Change product states.","description":"Records the target publish state (PUBLISH or UNPUBLISH) for a batch of products in one context; it does not push anything live by itself. To actually publish or unpublish the products, create a session with create_publish_session, add the same product ids with add_products_to_publish_session, and start it with complete_publish_session. Product ids that do not resolve to an active product in this organization are silently ignored rather than causing a failure.","operationId":"changeProductState","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductStateChangeRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"PRODUCTS","accessType":"PUBLISH"}],"security":[{"oauth2":[]}]}},"/category/state/list/by-ids":{"post":{"tags":["Categories"],"summary":"List category states.","operationId":"searchCategoryStateByIds","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryStateSearchListRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryStateSearchListResponse"}}}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"CATALOG","accessType":"LIST"}],"security":[{"oauth2":[]}]}},"/session/{id}/report/products/link":{"get":{"tags":["Session report"],"summary":"Get products report link.","operationId":"getSessionReportProductsLink","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionReportLinkResponse"}}}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found\n\nThis response indicates that the requested resource could not be found on the server. It typically occurs when no resource matches the requested URI, or the resource identifier used in the request does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"PRODUCTS","accessType":"PUBLISH"}],"security":[{"oauth2":[]}]}},"/session/{id}/report/issues/products":{"get":{"tags":["Session report"],"summary":"Get products issues for the session.","description":"Lists the individual products that failed or were skipped while syncing this session, grouped by issue type (e.g. version conflicts from a stale lastUpdate, or products that could not be published). Use it to explain a PUBLISHED_WITH_ISSUES result at the product level, once get_publish_session_report shows the session reached a terminal status. For asset- or entity-level failures use get_publish_session_asset_issues or get_publish_session_entity_issues instead.","operationId":"getSessionProductsIssues","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductsIssuesResponse"}}}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found\n\nThis response indicates that the requested resource could not be found on the server. It typically occurs when no resource matches the requested URI, or the resource identifier used in the request does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"PRODUCTS","accessType":"PUBLISH"}],"security":[{"oauth2":[]}]}},"/session/{id}/report/issues/entities":{"get":{"tags":["Session report"],"summary":"Get entities issues for the session.","description":"Lists the per-entity problems (e.g. categories or other non-product/asset entities) that went wrong while syncing this session, grouped by issue type. Use it to explain a PUBLISHED_WITH_ISSUES result at the entity level, once get_publish_session_report shows the session reached a terminal status. For product- or asset-specific failures use get_publish_session_product_issues or get_publish_session_asset_issues instead.","operationId":"getSessionEntitiesIssues","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitiesIssuesResponse"}}}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found\n\nThis response indicates that the requested resource could not be found on the server. It typically occurs when no resource matches the requested URI, or the resource identifier used in the request does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"PRODUCTS","accessType":"PUBLISH"}],"security":[{"oauth2":[]}]}},"/session/{id}/report/issues/assets":{"get":{"tags":["Session report"],"summary":"Get assets issues for the session.","description":"Lists the individual assets (e.g. images or files) that failed while syncing this session, grouped by issue type. Use it to explain a PUBLISHED_WITH_ISSUES result at the asset level, once get_publish_session_report shows the session reached a terminal status. For product- or entity-level failures use get_publish_session_product_issues or get_publish_session_entity_issues instead.","operationId":"getSessionAssetsIssues","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetsIssuesResponse"}}}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found\n\nThis response indicates that the requested resource could not be found on the server. It typically occurs when no resource matches the requested URI, or the resource identifier used in the request does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"PRODUCTS","accessType":"PUBLISH"}],"security":[{"oauth2":[]}]}},"/session/{id}/report/entities/link":{"get":{"tags":["Session report"],"summary":"Get entities report link.","operationId":"getSessionReportLink","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionReportLinkResponse"}}}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found\n\nThis response indicates that the requested resource could not be found on the server. It typically occurs when no resource matches the requested URI, or the resource identifier used in the request does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"PRODUCTS","accessType":"PUBLISH"}],"security":[{"oauth2":[]}]}},"/session/{id}/report/assets/link":{"get":{"tags":["Session report"],"summary":"Get assets report link.","operationId":"getSessionReportAssetLink","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionReportLinkResponse"}}}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found\n\nThis response indicates that the requested resource could not be found on the server. It typically occurs when no resource matches the requested URI, or the resource identifier used in the request does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"PRODUCTS","accessType":"PUBLISH"}],"security":[{"oauth2":[]}]}},"/session/{id}/report":{"get":{"tags":["Session report"],"summary":"Get a session report.","description":"Returns running totals for the session and can be called at any time, including while it is still IN_PROGRESS — counts simply reflect what has been processed so far. metrics/categoriesMetrics stay empty until the session starts pushing data for a context, and break the totals down per context. For the underlying per-product/asset/entity issues, use get_publish_session_product_issues, get_publish_session_asset_issues or get_publish_session_entity_issues instead.","operationId":"getSessionReport","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionReportResponse"}}}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found\n\nThis response indicates that the requested resource could not be found on the server. It typically occurs when no resource matches the requested URI, or the resource identifier used in the request does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"PRODUCTS","accessType":"PUBLISH"}],"security":[{"oauth2":[]}]}},"/session/{id}":{"get":{"tags":["Session sync"],"summary":"Get sync session.","description":"Use this to poll a session's progress after closing it. A session moves through CREATED (open for adding products) -> INITIALIZED -> IN_PROGRESS -> a terminal status: PUBLISHED, PUBLISHED_WITH_ISSUES (finished, but see get_publish_session_report and the issue tools for what failed), CANCELLED, or FAILED. errorReports tracks the background generation of downloadable issue files and is unrelated to the summary counts returned by get_publish_session_report.","operationId":"getSession","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncSessionResponse"}}}},"400":{"description":"Bad Request\n\nThis response indicates that the server could not understand the request due to invalid syntax. It is typically triggered by client-side input errors such as improperly formatted requests, missing required fields, or invalid data values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found\n\nThis response indicates that the requested resource could not be found on the server. It typically occurs when no resource matches the requested URI, or the resource identifier used in the request does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-bluestone-allowed-user-types":["RESTRICTED","STANDARD"],"x-bluestone-permission":[{"module":"PRODUCTS","accessType":"PUBLISH"}],"security":[{"oauth2":[]}]}}},"components":{"schemas":{"CreateSessionReportRequest":{"type":"object","properties":{"format":{"type":"string","enum":["csv","xlsx"]}}},"ObjectId":{"type":"string"},"ProductsByIssueTypeCursorRequest":{"type":"object","properties":{"issueTypes":{"title":"Product issues will be filtered based on this product issue types.","maxItems":2147483647,"minItems":1,"type":"array","items":{"title":"Product issues will be filtered based on this product issue types.","type":"string","enum":["PRODUCT_NOT_FOUND","VERSION_CONFLICT","INVALID_PRODUCT_PUBLISH_STATE","MISSING_PRODUCT_NAME","INVALID_ATTRIBUTE_VALUE","MISSING_CATEGORY_ATTRIBUTE","MISSING_CATEGORY_VALUE","INVALID_CATEGORY_VALUE","MISSING_COMPOUND_ATTRIBUTE","MISSING_VARIANT_ATTRIBUTE","MISSING_VARIANT_VALUE","INVALID_VARIANT_VALUE","DICTIONARY_VALUE_NOT_EXIST_IN_FILTER","INVALID_ASSET_ATTRIBUTE_VALUE","MISSING_PRODUCT_LABEL_NAME"]}},"context":{"title":"The context in which the issue occurred.","type":"string"},"cursor":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ObjectId"}]},"pageSize":{"title":"Size of a block of items to return.","maximum":500,"type":"integer","format":"int32"}}},"ProductCursorResponse":{"title":"List of products.","type":"object","properties":{"productId":{"$ref":"#/components/schemas/ObjectId"}}},"ProductsByIssueTypeCursorResponse":{"type":"object","properties":{"data":{"title":"List of products.","type":"array","items":{"$ref":"#/components/schemas/ProductCursorResponse"}},"nextCursor":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ObjectId"}]}}},"AssetsByIssueTypeCursorRequest":{"type":"object","properties":{"issueTypes":{"title":"Asset issues will be filtered based on this asset issue types.","maxItems":2147483647,"minItems":1,"type":"array","items":{"title":"Asset issues will be filtered based on this asset issue types.","type":"string","enum":["INVALID_ATTRIBUTE_VALUE"]}},"context":{"title":"The context in which the issue occurred.","type":"string"},"cursor":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ObjectId"}]},"pageSize":{"title":"Size of a block of items to return.","maximum":500,"type":"integer","format":"int32"}}},"AssetCursorResponse":{"title":"List of assets.","type":"object","properties":{"assetId":{"title":"An identifier randomly generated by PIM. ID is unique across all products.","type":"string"}}},"AssetsByIssueTypeCursorResponse":{"type":"object","properties":{"data":{"title":"List of assets.","type":"array","items":{"$ref":"#/components/schemas/AssetCursorResponse"}},"nextCursor":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ObjectId"}]}}},"AddProductsToSessionRequest":{"type":"object","properties":{"products":{"title":"Products to add to the session, 1 to 100 per call.","maxItems":100,"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/ProductSyncRequest"}}}},"ProductSyncRequest":{"title":"Products to add to the session, 1 to 100 per call.","type":"object","properties":{"productId":{"title":"The PIM product id to sync.","type":"string"},"lastUpdate":{"title":"Optional: the product's lastUpdate timestamp (epoch millis) as last read from PIM. If given and PIM's current value is newer, this product is skipped and reported as a version-conflict issue instead of being synced with stale data. Omit to skip this check.","type":"integer","format":"int64","nullable":true}}},"SyncSessionRequest":{"type":"object","properties":{"contexts":{"title":"Publication contexts (e.g. language codes) this session will sync, such as ['en', 'de']. Each must be an existing, non-archived context for this organization.","type":"array","items":{"title":"Publication contexts (e.g. language codes) this session will sync, such as ['en', 'de']. Each must be an existing, non-archived context for this organization.","type":"string"}}}},"ProductStateSearchListRequest":{"required":["contextId"],"type":"object","properties":{"productIds":{"title":"List of product ids.","maxItems":100,"minItems":1,"type":"array","items":{"title":"List of product ids.","type":"string"}},"contextId":{"title":"Context for given product states.","minLength":1,"type":"string"}}},"ProductStateSearchElementListResponse":{"type":"object","properties":{"productId":{"title":"An identifier randomly generated by PIM. ID is unique across all products.","type":"string"},"papiPublishState":{"title":"Product publish state.","type":"string","enum":["TO_BE_PUBLISHED","PUBLISHED","DRAFT","TO_BE_UNPUBLISHED"]},"context":{"title":"Context for given product.","type":"string"},"papiOutOfSync":{"title":"Flag represents whether data in PAPI is up to date.","type":"boolean"},"lastSyncState":{"title":"Product last sync state.","type":"string","nullable":true,"enum":["SUCCESSFUL","FAILED"]}}},"ProductStateSearchListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProductStateSearchElementListResponse"}}}},"ProductStateChangeRequest":{"required":["context"],"type":"object","properties":{"productIds":{"title":"PIM product ids to change, 1 to 100 per call.","maxItems":100,"minItems":1,"type":"array","items":{"title":"PIM product ids to change, 1 to 100 per call.","type":"string"}},"context":{"title":"The single publication context (e.g. a language code) the state change applies to. Must be an existing, non-archived context for this organization, otherwise the call fails.","minLength":1,"type":"string"},"action":{"title":"PUBLISH schedules the products to go live; UNPUBLISH schedules them to be taken down (or cancels a pending PUBLISH that hasn't been synced yet). Either way, the change only takes effect once pushed through a sync session.","type":"string","enum":["PUBLISH","UNPUBLISH"]}}},"CategoryStateSearchListRequest":{"required":["contextId"],"type":"object","properties":{"categoryIds":{"title":"List of category ids.","maxItems":100,"minItems":1,"type":"array","items":{"title":"List of category ids.","type":"string"}},"contextId":{"title":"Context for given category states.","minLength":1,"type":"string"}}},"CategoryStateSearchElementListResponse":{"type":"object","properties":{"categoryId":{"title":"An identifier randomly generated by PIM. ID is unique across all categories.","type":"string"},"context":{"title":"Context for given category.","type":"string"},"papiOutOfSync":{"title":"Flag represents whether data in PAPI is up to date.","type":"boolean"},"papiPublishState":{"title":"Category publish state.","type":"string","enum":["TO_BE_PUBLISHED","PUBLISHED","TO_BE_UNPUBLISHED"]}}},"CategoryStateSearchListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CategoryStateSearchElementListResponse"}}}},"SessionReportLinkResponse":{"type":"object","properties":{"url":{"type":"string"}}},"ProductIssue":{"title":"List of product issues.","type":"object","properties":{"context":{"title":"The context in which the issue occurred.","type":"string","nullable":true},"issueType":{"title":"Product issue type.","type":"string","enum":["PRODUCT_NOT_FOUND","VERSION_CONFLICT","INVALID_PRODUCT_PUBLISH_STATE","MISSING_PRODUCT_NAME","INVALID_ATTRIBUTE_VALUE","MISSING_CATEGORY_ATTRIBUTE","MISSING_CATEGORY_VALUE","INVALID_CATEGORY_VALUE","MISSING_COMPOUND_ATTRIBUTE","MISSING_VARIANT_ATTRIBUTE","MISSING_VARIANT_VALUE","INVALID_VARIANT_VALUE","DICTIONARY_VALUE_NOT_EXIST_IN_FILTER","INVALID_ASSET_ATTRIBUTE_VALUE","MISSING_PRODUCT_LABEL_NAME"]},"count":{"title":"Number of products with given issue in given context.","type":"integer","format":"int32"}}},"ProductsIssuesResponse":{"type":"object","properties":{"data":{"title":"List of product issues.","type":"array","items":{"$ref":"#/components/schemas/ProductIssue"}}}},"EntitiesIssuesResponse":{"type":"object","properties":{"data":{"title":"List of entity issues.","type":"array","items":{"$ref":"#/components/schemas/EntityIssue"}}}},"EntityIssue":{"title":"List of entity issues.","type":"object","properties":{"context":{"title":"The context in which the issue occurred.","type":"string"},"issueType":{"title":"Entity issue type.","type":"string","enum":["MISSING_ATTRIBUTE_NAME","MISSING_RELATION_NAME","MISSING_CATEGORY_NAME","MISSING_SELECT_ATTRIBUTE_NAME","MISSING_DICTIONARY_ATTRIBUTE_NAME","MISSING_DEFINITION_GROUP_NAME","MISSING_PRODUCT_LABEL_NAME","INVALID_CATEGORY_ATTRIBUTE_VALUE","CATEGORY_DICTIONARY_VALUE_NOT_EXIST_IN_FILTER"]},"count":{"title":"Number of entities with given issue in given context.","type":"integer","format":"int32"},"entityType":{"title":"Entity type.","type":"string","enum":["CATEGORY","ATTRIBUTE_GROUP","ATTRIBUTE","SELECT_ATTRIBUTE_VALUES","DICTIONARY_ATTRIBUTE_VALUES","RELATION","PRODUCT_LABEL"]}}},"AssetIssue":{"title":"List of asset issues.","type":"object","properties":{"context":{"title":"The context in which the issue occurred.","type":"string","nullable":true},"issueType":{"title":"Product issue type.","type":"string","enum":["INVALID_ATTRIBUTE_VALUE","INVALID_ASSET_ATTRIBUTE_VALUE","MISSING_CATEGORY_ATTRIBUTE","MISSING_CATEGORY_VALUE","INVALID_CATEGORY_VALUE","MISSING_COMPOUND_ATTRIBUTE","MISSING_VARIANT_ATTRIBUTE","MISSING_VARIANT_VALUE","INVALID_VARIANT_VALUE","DICTIONARY_VALUE_NOT_EXIST_IN_FILTER"]},"count":{"title":"Number of products with given issue in given context.","type":"integer","format":"int32"}}},"AssetsIssuesResponse":{"type":"object","properties":{"data":{"title":"List of asset issues.","type":"array","items":{"$ref":"#/components/schemas/AssetIssue"}}}},"CategoryPublicationSummaryResponse":{"title":"One breakdown per synced context of how categories were affected; empty until the session starts pushing that context.","type":"object","properties":{"context":{"title":"The publication context this breakdown is for.","type":"string"},"papiSessionId":{"title":"Id of the downstream public-API session that carried out this context's publication, if one was created yet.","type":"string","nullable":true},"addedCategories":{"title":"Categories newly published in this context by this session.","type":"integer","format":"int32","nullable":true},"modifiedCategories":{"title":"Already-published categories in this context that were updated by this session.","type":"integer","format":"int32","nullable":true},"unpublishedCategories":{"title":"Categories unpublished from this context by this session.","type":"integer","format":"int32","nullable":true}}},"ProductPublicationSummaryResponse":{"title":"One breakdown per synced context of how products were affected; empty until the session starts pushing that context.","type":"object","properties":{"context":{"title":"The publication context this breakdown is for.","type":"string"},"papiSessionId":{"title":"Id of the downstream public-API session that carried out this context's publication, if one was created yet.","type":"string","nullable":true},"addedProducts":{"title":"Products newly published in this context by this session.","type":"integer","format":"int32","nullable":true},"modifiedProducts":{"title":"Already-published products in this context that were updated by this session.","type":"integer","format":"int32","nullable":true},"unpublishedProducts":{"title":"Products unpublished from this context by this session.","type":"integer","format":"int32","nullable":true}}},"SessionReportResponse":{"type":"object","properties":{"totalProducts":{"title":"Number of products processed in the session.","type":"integer","format":"int32"},"failedProducts":{"title":"Number of products that failed in the session.","type":"integer","format":"int32"},"successProducts":{"title":"Number of products that were successful in the session.","type":"integer","format":"int32"},"totalCategories":{"title":"Number of categories processed in the session.","type":"integer","format":"int32"},"metrics":{"title":"One breakdown per synced context of how products were affected; empty until the session starts pushing that context.","type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ProductPublicationSummaryResponse"}},"categoriesMetrics":{"title":"One breakdown per synced context of how categories were affected; empty until the session starts pushing that context.","type":"array","nullable":true,"items":{"$ref":"#/components/schemas/CategoryPublicationSummaryResponse"}}}},"ErrorReport":{"title":"Generation status of the downloadable per-entity-type issue files (CSV/XLSX), one entry per format/type combination. Unrelated to the aggregate counts in get_publish_session_report.","type":"object","properties":{"format":{"type":"string","enum":["csv","xlsx"]},"type":{"type":"string","enum":["ENTITY","PRODUCT","ASSET"]},"status":{"type":"string","enum":["GENERATING","GENERATED","FAILED"]}}},"SyncSessionResponse":{"type":"object","properties":{"id":{"title":"The session id, generated when it was created. Use it as the path id for every other session/report call.","type":"string"},"contexts":{"title":"The contexts this session syncs, as given when it was created.","type":"array","items":{"title":"The contexts this session syncs, as given when it was created.","type":"string"}},"status":{"title":"Lifecycle status: CREATED (open, keep adding products) -> INITIALIZED -> IN_PROGRESS -> PUBLISHED or PUBLISHED_WITH_ISSUES (done), or CANCELLED / FAILED. Keep polling while not in a terminal status.","type":"string","enum":["CREATED","INITIALIZED","IN_PROGRESS","PUBLISHED","PUBLISHED_WITH_ISSUES","TO_CANCEL","CANCELLED","FAILED"]},"errorReports":{"title":"Generation status of the downloadable per-entity-type issue files (CSV/XLSX), one entry per format/type combination. Unrelated to the aggregate counts in get_publish_session_report.","type":"array","items":{"$ref":"#/components/schemas/ErrorReport"}}}},"ErrorResponse":{"type":"object","properties":{"status":{"title":"Error status code.","type":"integer","format":"int32"},"error":{"title":"General error description.","type":"string"},"errorDetails":{"title":"List of errors details.","type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}},"requestId":{"title":"Request ID used for logging.","type":"string"},"timestamp":{"title":"Error timestamp.","type":"integer","format":"int64"},"conflictingEntities":{"title":"Additional entity id list related to error","type":"array","items":{"$ref":"#/components/schemas/ConflictingEntity"}},"quotaLimitExceededDetails":{"title":"Additional details related to quota limit exceeded errors","type":"array","items":{"$ref":"#/components/schemas/LimitExceededDetails"}}}},"ErrorDetails":{"type":"object","properties":{"message":{"title":"Error message.","type":"string"},"field":{"title":"Error related field.","type":"string"},"rejectedValue":{"title":"Invalid value causing error.","type":"string"},"entityId":{"title":"Identifier of the entity related to the error.","type":"string"},"entityType":{"title":"Type of the entity related to the error.","type":"string"}}},"ConflictingEntity":{"type":"object","properties":{"entityId":{"title":"Identifier of the related entity causing the conflict","type":"string"},"entityType":{"title":"Type of the related entity causing the conflict","type":"string"}}},"LimitExceededDetails":{"type":"object","properties":{"message":{"title":"Detailed quota error message","type":"string"},"quota":{"title":"Unique quota identifier","type":"string"},"limit":{"title":"Allowed limit","type":"integer","format":"int32"},"entityId":{"title":"ID of the entity that violated the quota","type":"string","nullable":true},"entityType":{"title":"Type of the entity that violated the quota","type":"string","nullable":true}}}},"securitySchemes":{"oauth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://idp.test.bluestonepim.com/op/token","scopes":{"openid profile systemRoles permissions organization email name nickname":"All needed scopes."}}}}}},"x-amazon-apigateway-api-key-source":"AUTHORIZER"}