{"openapi":"3.0.1","info":{"title":"Product Unavailability API","description":"API for managing product unavailability constraints.","version":"1.0.0","contact":{"name":"Flux Squad","url":"https://cimpress-support.atlassian.net/wiki/spaces/Flux/overview","email":"fluxsquad@cimpress.com"}},"security":[{"auth0AccessToken":[]},{"Cimpress-Security":[]},{"CimpressSecurity":[]}],"servers":[{"url":"/"}],"paths":{"/api/v1/products/{productId}/constraints":{"get":{"tags":["UnavailabilityConstraints"],"summary":"Get all unavailability constraints","description":"Retrieves all unavailability constraints for a specific product and version with optional filters.","operationId":"getUnavailibilityConstraints","parameters":[{"name":"productId","in":"path","required":true,"description":"The ID of the product.","schema":{"type":"string"}},{"name":"productVersion","in":"query","required":false,"description":"The version of the product.","schema":{"type":"integer"}},{"name":"type","in":"query","required":false,"description":"Filter by type of product unavailability.","schema":{"type":"string","enum":["TEMPORARILY_UNAVAILABLE","DISCONTINUED"]}},{"name":"allowPartialMatching","in":"query","required":false,"description":"To optionally return constraints that partially matches with the given selections","schema":{"type":"boolean"}},{"name":"context","in":"query","required":false,"explode":true,"style":"deepObject","description":"Context filter for Merchant and country.\nExample:\n[\n  {\n    \"key\": \"Merchant\",\n    \"value\": \"VISTAPRINT\"\n  }\n].\nUse URLEncoder to encode this value\n","schema":{"type":"array"}},{"name":"condition","in":"query","required":false,"explode":true,"style":"deepObject","description":"Condition filter for fulfillerLocationId.\nExample:\n[\n  {\n    \"key\": \"fulfillerLocationId\",\n    \"value\": \"kx3rje98\"\n  }\n].\nUse URLEncoder to encode this value\n","schema":{"type":"array"}},{"name":"source","in":"query","required":false,"explode":true,"style":"form","description":"Array of source types used to filter constraints based on from where the constraints were created. If not specified, constraints from all sources are included.\nExample:\n[\n  \"MERCHANT\",\n  \"SUPPLIER\"\n].\nUse URLEncoder to encode this value\n","schema":{"type":"array","items":{"type":"string","enum":["MERCHANT","SUPPLIER"]}}},{"name":"attributeSelection","in":"query","style":"deepObject","description":"Product options filter for unavailability constraints.","schema":{"type":"object","additionalProperties":{"type":"string"}},"example":{"Color":"Red","FinishType":"Glossy"}},{"name":"offset","in":"query","required":false,"description":"The number of items to skip.","schema":{"type":"integer","default":0}},{"name":"limit","in":"query","required":false,"description":"The maximum number of items to return in the result.","schema":{"type":"integer","default":10}}],"responses":{"200":{"description":"List of Unavailability constraints.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnavailabilityResourceCollection"}}}},"500":{"description":"Internal server error, unable to retrieve the unavailability constraint.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"details":{"type":"string"}}}}}}},"security":[{"Cimpress-Security":[]},{"auth0AccessToken":[]},{"CimpressSecurity":[]}]}},"/api/v1/products/{productId}/versions/{productVersion}/constraints":{"post":{"tags":["UnavailabilityConstraints"],"summary":"Create a new unavailability constraint","description":"Creates a new unavailability constraint for the specified product and version.","operationId":"createUnavailibilityConstraint","parameters":[{"name":"productId","in":"path","required":true,"description":"The ID of the product.","schema":{"type":"string"}},{"name":"productVersion","in":"path","required":true,"description":"The version of the product.","schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnavailabilityCreateResource"}}}},"responses":{"201":{"description":"Constraint created successfully.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnavailabilityResource"},{"$ref":"#/components/schemas/FulfillerUnavailabilityResource"}]}}}},"400":{"description":"Invalid request parameters or body.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}},"422":{"description":"Unprocessable entity, such as duplicate constraint or invalid version.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"details":{"type":"string"}}}}}},"500":{"description":"Internal server error, a failure in creating the constraint.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"details":{"type":"string"}}}}}}},"security":[{"Cimpress-Security":[]},{"auth0AccessToken":[]},{"CimpressSecurity":[]}]}},"/api/v1/constraints/{unavailabilityId}":{"get":{"tags":["UnavailabilityConstraints"],"summary":"Get unavailability constraint by ID","description":"Retrieves a specific unavailability constraint by ID.","operationId":"getUnavailibilityConstraint","parameters":[{"name":"unavailabilityId","in":"path","required":true,"description":"The ID of the unavailability constraint.","schema":{"type":"string"}}],"responses":{"200":{"description":"Unavailability constraint details retrieved successfully.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnavailabilityResource"},{"$ref":"#/components/schemas/FulfillerUnavailabilityResource"}]}}}},"404":{"description":"Unavailability constraint not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"example":{"message":"Could not find unavailability constraint with ID: abc123."}}}}},"500":{"description":"Internal server error, unable to retrieve the unavailability constraint.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"details":{"type":"string"}}}}}}},"security":[{"Cimpress-Security":[]},{"auth0AccessToken":[]},{"CimpressSecurity":[]}]},"put":{"tags":["UnavailabilityConstraints"],"summary":"Update unavailability constraint by ID","description":"Updates a unavailability constraint for the specified unavailability ID.","operationId":"updateUnavailibilityConstraint","parameters":[{"name":"unavailabilityId","in":"path","required":true,"schema":{"type":"string"},"description":"The ID of the unavailability constraint to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnavailabilityUpdateResource"}}}},"responses":{"200":{"description":"Constraint updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnavailabilityResource"}}}},"404":{"description":"Unavailability constraint not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"example":{"message":"Could not find unavailability constraint with ID: abc123."}}}}},"422":{"description":"Duplicate constraint or unprocessable entity.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}},"examples":{"invalidInput":{"value":{"message":"Invalid reason provided. Must be one of: [Maintenance, Outage]."}},"duplicateConstraint":{"value":{"message":"Duplicate constraint already exists with ID: xyz789."}}}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"example":{"message":"Unable to update constraint due to an unexpected error."}}}}}},"security":[{"Cimpress-Security":[]},{"auth0AccessToken":[]},{"CimpressSecurity":[]}]},"delete":{"tags":["UnavailabilityConstraints"],"summary":"Delete unavailability constraint by ID","description":"Deletes a specific unavailability constraint by ID.","operationId":"deleteUnavailibilityConstraint","parameters":[{"name":"unavailabilityId","in":"path","description":"The unique identifier of the unavailability constraint to delete.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Constraint deleted successfully. No content will be returned."},"404":{"description":"Unavailability constraint not found.","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":404},"message":{"type":"string","example":"Resource with id {unavailabilityId} not found."}}}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":500},"message":{"type":"string","example":"An error occurred while processing the request."}}}}}}},"security":[{"Cimpress-Security":[]},{"auth0AccessToken":[]},{"CimpressSecurity":[]}]}},"/api/v1/constraints/bulk":{"post":{"tags":["UnavailabilityConstraints"],"summary":"Bulk create unavailability constraints","description":"Creates multiple unavailability constraints in bulk.","operationId":"bulkCreateUnavailibilityConstraint","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/BulkUnavailabilityCreateResource"}}}}},"responses":{"202":{"description":"Accepted.","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}}}}}},"500":{"description":"Internal server error."}},"security":[{"Cimpress-Security":[]},{"auth0AccessToken":[]},{"CimpressSecurity":[]}]},"delete":{"tags":["UnavailabilityConstraints"],"summary":"Bulk delete unavailability constraints","description":"Deletes multiple unavailability constraints by their IDs.","operationId":"bulkDeleteUnavailibilityConstraint","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnavailabilityDeleteBulkResource"}}}},"responses":{"202":{"description":"Accepted.","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}}}}}},"500":{"description":"Internal server error."}},"security":[{"Cimpress-Security":[]},{"auth0AccessToken":[]},{"CimpressSecurity":[]}]}},"/api/v1/constraints/bulk/jobs/{jobId}":{"get":{"tags":["UnavailabilityConstraints"],"summary":"Bulk get unavailability constraints","description":"Gets multiple unavailability constraints in bulk for jobId.","operationId":"bulkGetUnavailibilityConstraint","parameters":[{"name":"jobId","in":"path","required":true,"description":"Id of bulk constraints job.","schema":{"type":"string"}},{"name":"offset","in":"query","schema":{"type":"integer"}},{"name":"limit","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"Constraint details fetched successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUnavailabilityResponse"}}}},"500":{"description":"Internal server error."}},"security":[{"Cimpress-Security":[]},{"auth0AccessToken":[]},{"CimpressSecurity":[]}]}},"/livecheck":{"get":{"tags":["Health Check"],"summary":"Runs a livecheck to ensure that the service is running.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"},"message":{"type":"string","example":"Service is running"},"timestamp":{"type":"string","format":"date-time","example":"2025-01-15T12:00:00Z"}}}}}}}}},"/healthcheck":{"get":{"tags":["Health Check"],"summary":"Runs a healthcheck to ensure that the service is running.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"},"message":{"type":"string","example":"Service is healthy"},"timestamp":{"type":"string","format":"date-time","example":"2025-01-15T12:00:00Z"}}}}}}}}},"/api/v1/constraints/reasons":{"get":{"tags":["UnavailabilityConstraints"],"summary":"Get reasons available for configuring unavailability constraints","description":"Retrieves the list of reasons available to users for configuring unavailability constraints for a specific account.","operationId":"getPublicReasons","parameters":[{"name":"accountId","in":"query","required":true,"description":"The ID of the account.","schema":{"type":"string","example":"g2Ez5VaoZWoqU22XqPjTLU"}}],"responses":{"200":{"description":"List of reasons available for configuring unavailability constraints.","content":{"application/json":{"schema":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"example":["High Complaint Rate","Legal Compliance Issue"]}}}}}},"400":{"description":"Bad request - Account ID is required.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Account ID is required"}}}}}},"404":{"description":"No reasons configured for the specified account.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"No reasons configured for account: g2Ez5VaoZWoqU22XqPjTLU"}}}}}},"500":{"description":"Internal server error, unable to retrieve the reasons.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}}},"components":{"schemas":{"Context":{"type":"object","properties":{"key":{"type":"string","description":"The context key."},"value":{"type":"string","description":"The context value."}},"example":{"key":"COUNTRY","value":"CH"}},"Condition":{"type":"object","properties":{"key":{"type":"string","description":"The condition key."},"value":{"type":"string","description":"The condition value."}},"example":{"key":"fulfillmentLocationId","value":"123"}},"AttributeConstraint":{"type":"object","properties":{"attributeKey":{"type":"string","description":"The key for the attribute constraint."},"values":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["stringLiteral","numberLiteral","range"],"description":"The type of value for the constraint."},"stringLiteral":{"type":"string","description":"A literal string value."},"numberLiteral":{"type":"string","description":"A literal numeric value."},"range":{"type":"object","description":"The range for numeric constraints.","properties":{"minimum":{"oneOf":[{"type":"integer"},{"type":"string"},{"type":"object","nullable":true}],"description":"The minimum value."},"maximum":{"oneOf":[{"type":"integer"},{"type":"string"},{"type":"object","nullable":true}],"description":"The maximum value."},"increment":{"oneOf":[{"type":"integer"},{"type":"string"},{"type":"object","nullable":true}],"description":"The increment value."}}}}}}}},"BulkUnavailabilityResponse":{"type":"object","properties":{"offset":{"type":"integer","description":"The offset for pagination."},"total":{"type":"integer","description":"The total number of records."},"count":{"type":"integer","description":"The number of records in the current response."},"_embedded":{"type":"object","properties":{"item":{"type":"array","items":{"$ref":"#/components/schemas/BulkUnavailabilityResource"}}}},"jobId":{"type":"string"},"jobStatus":{"type":"string","enum":["PENDING","INPROGRESS","COMPLETED"]}}},"SelfLink":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string","description":"Absolute URL."}}}}},"UnavailabilityResource":{"type":"object","properties":{"unavailabilityId":{"type":"string"},"name":{"type":"string"},"productId":{"type":"string"},"productVersion":{"type":"integer"},"type":{"type":"string","enum":["TEMPORARILY_UNAVAILABLE","DISCONTINUED"]},"source":{"type":"string","enum":["MERCHANT","SUPPLIER"]},"reason":{"type":"string"},"context":{"type":"array","items":{"$ref":"#/components/schemas/Context"}},"attributeConstraint":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/AttributeConstraint"}}},"example":{"unavailabilityId":"d9363f47-8952-46aa-9c57-774147e72ebe","name":"Vistaprint US - Capacity Restriction","productId":"PRD-SVZ2F2M66","productVersion":1,"type":"TEMPORARILY_UNAVAILABLE","source":"MERCHANT","reason":"Legal Compliance Issue","context":[{"key":"Country","value":"US"},{"key":"Merchant","value":"VISTAPRINT"}],"attributeConstraint":[{"attributeKey":"Capacity","values":[{"type":"stringLiteral","stringLiteral":"341"}]}],"createdBy":"user@cimpress.com","createdAt":"2025-02-05T17:27:25.544Z","modifiedBy":"user@cimpress.com","modifiedAt":"2025-02-05T17:27:25.544Z"}},"FulfillerUnavailabilityResource":{"type":"object","properties":{"unavailabilityId":{"type":"string"},"name":{"type":"string"},"productId":{"type":"string"},"productVersion":{"type":"integer"},"type":{"type":"string","enum":["TEMPORARILY_UNAVAILABLE","DISCONTINUED"]},"source":{"type":"string","enum":["MERCHANT","SUPPLIER"]},"reason":{"type":"string"},"condition":{"type":"array","items":{"$ref":"#/components/schemas/Condition"}},"attributeConstraint":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/AttributeConstraint"}}},"example":{"unavailabilityId":"d9363f47-8952-46aa-9c57-774147e72ebe","name":"Vistaprint US - Capacity Restriction","productId":"PRD-SVZ2F2M66","productVersion":1,"type":"TEMPORARILY_UNAVAILABLE","source":"SUPPLIER","reason":"Legal Compliance Issue","condition":[{"key":"fulfillmentLocationId","value":"kx3rje98"}],"attributeConstraint":[{"attributeKey":"Capacity","values":[{"type":"stringLiteral","stringLiteral":"341"}]}],"createdBy":"user@cimpress.com","createdAt":"2025-02-05T17:27:25.544Z","modifiedBy":"user@cimpress.com","modifiedAt":"2025-02-05T17:27:25.544Z"}},"BulkUnavailabilityResource":{"type":"object","properties":{"unavailabilityId":{"type":"string"},"name":{"type":"string"},"productId":{"type":"string"},"productVersion":{"type":"integer"},"constraintStatus":{"type":"string","enum":["PENDING","INPROGRESS","CREATED","DELETED","DUPLICATE","FAILED"]},"failureReason":{"type":"string"},"type":{"type":"string","enum":["TEMPORARILY_UNAVAILABLE","DISCONTINUED"]},"source":{"type":"string","enum":["MERCHANT","SUPPLIER"]},"reason":{"type":"string"},"context":{"type":"array","items":{"$ref":"#/components/schemas/Context"}},"attributeConstraint":{"type":"array","items":{"$ref":"#/components/schemas/AttributeConstraint"}},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"modifiedBy":{"type":"string"},"modifiedAt":{"type":"string"}}},"UnavailabilityResourceCollection":{"oneOf":[{"allOf":[{"type":"object","properties":{"offset":{"type":"integer","description":"The offset for pagination."},"total":{"type":"integer","description":"The total number of records."},"count":{"type":"integer","description":"The number of records in the current response."},"results":{"type":"array","items":{"$ref":"#/components/schemas/UnavailabilityResource"}}},"example":{"offset":0,"total":1,"count":1,"results":[{"unavailabilityId":"d9363f47-8952-46aa-9c57-774147e72ebe","name":"Vistaprint US - Capacity Restriction","productId":"PRD-SVZ2F2M66","productVersion":1,"type":"TEMPORARILY_UNAVAILABLE","source":"MERCHANT","reason":"Legal Compliance Issue","context":[{"key":"Country","value":"US"},{"key":"Merchant","value":"VISTAPRINT"}],"attributeConstraint":[{"attributeKey":"Capacity","values":[{"type":"stringLiteral","stringLiteral":"341"}]}],"createdBy":"user@cimpress.com","createdAt":"2025-02-05T17:27:25.544Z","modifiedBy":"user@cimpress.com","modifiedAt":"2025-02-05T17:27:25.544Z"}]}}]},{"allOf":[{"type":"object","properties":{"offset":{"type":"integer","description":"The offset for pagination."},"total":{"type":"integer","description":"The total number of records."},"count":{"type":"integer","description":"The number of records in the current response."},"results":{"type":"array","items":{"$ref":"#/components/schemas/FulfillerUnavailabilityResource"}}},"example":{"offset":0,"total":1,"count":1,"results":[{"unavailabilityId":"d9363f47-8952-46aa-9c57-774147e72ebe","name":"Vistaprint US - Capacity Restriction","productId":"PRD-SVZ2F2M66","productVersion":1,"type":"TEMPORARILY_UNAVAILABLE","reason":"Legal Compliance Issue","condition":[{"key":"fulfillmentLocationId","value":"kx3rje98"}],"attributeConstraint":[{"attributeKey":"Capacity","values":[{"type":"stringLiteral","stringLiteral":"341"}]}],"createdBy":"user@cimpress.com","createdAt":"2025-02-05T17:27:25.544Z","modifiedBy":"user@cimpress.com","modifiedAt":"2025-02-05T17:27:25.544Z"}]}}]}]},"UnavailabilityCreateBulkResource":{"type":"object","required":["name","productId","productVersion","type","reason","context","attributeConstraint"],"properties":{"name":{"type":"string","minLength":1},"productId":{"type":"string"},"productVersion":{"type":"string"},"type":{"type":"string","enum":["TEMPORARILY_UNAVAILABLE","DISCONTINUED"]},"reason":{"type":"string"},"context":{"type":"array","items":{"$ref":"#/components/schemas/Context"},"minItems":2},"attributeConstraint":{"type":"array","items":{"$ref":"#/components/schemas/AttributeConstraint"},"minItems":1,"nullable":true}},"example":{"name":"Vistaprint US - Capacity Restriction","productId":"PRD-123","productVersion":"1","type":"TEMPORARILY_UNAVAILABLE","reason":"Legal Compliance Issue","context":[{"key":"Country","value":"US"},{"key":"Merchant","value":"VISTAPRINT"}],"condition":[{"key":"fulfillmentLocationId","value":"kx3rje98"}],"attributeConstraint":[{"attributeKey":"Capacity","values":[{"type":"stringLiteral","stringLiteral":"341"}]}]}},"UnavailabilityDeleteBulkResource":{"type":"object","required":["unavailabilityIds"],"properties":{"unavailabilityIds":{"type":"array","items":{"type":"string"},"minItems":1}},"example":{"unavailabilityIds":["id123","id456","id789"]}},"BulkUnavailabilityCreateResource":{"allOf":[{"$ref":"#/components/schemas/UnavailabilityCreateResource"},{"type":"object","required":["productId","productVersion"],"properties":{"productId":{"type":"string"},"productVersion":{"type":"string"}}}],"example":{"productId":"PRD-XMQOK7LLV","productVersion":2,"name":"Vistaprint US - Capacity Restriction","type":"TEMPORARILY_UNAVAILABLE","reason":"Legal Compliance Issue","context":[{"key":"Country","value":"US"},{"key":"Merchant","value":"VISTAPRINT"}],"condition":[{"key":"fulfillmentLocationId","value":"kx3rje98"}],"attributeConstraint":[{"attributeKey":"Capacity","values":[{"type":"stringLiteral","stringLiteral":"341"}]}]}},"UnavailabilityCreateResource":{"oneOf":[{"allOf":[{"required":["type","reason","context","attributeConstraint"]},{"type":"object","properties":{"name":{"type":"string","nullable":true},"type":{"type":"string","enum":["TEMPORARILY_UNAVAILABLE","DISCONTINUED"]},"reason":{"type":"string"},"context":{"type":"array","items":{"$ref":"#/components/schemas/Context"}},"attributeConstraint":{"type":"array","items":{"$ref":"#/components/schemas/AttributeConstraint"},"nullable":true,"minItems":1}}}]},{"allOf":[{"required":["type","reason","condition","attributeConstraint"]},{"type":"object","properties":{"name":{"type":"string","nullable":true},"type":{"type":"string","enum":["TEMPORARILY_UNAVAILABLE","DISCONTINUED"]},"reason":{"type":"string"},"condition":{"type":"array","items":{"$ref":"#/components/schemas/Condition"}},"attributeConstraint":{"type":"array","items":{"$ref":"#/components/schemas/AttributeConstraint"},"nullable":true,"minItems":1}}}]}],"example":{"productId":"PRD-XMQOK7LLV","productVersion":2,"name":"Vistaprint US - Capacity Restriction","type":"TEMPORARILY_UNAVAILABLE","reason":"Legal Compliance Issue","context":[{"key":"Country","value":"US"},{"key":"Merchant","value":"VISTAPRINT"}],"condition":[{"key":"fulfillmentLocationId","value":"kx3rje98"}],"attributeConstraint":[{"attributeKey":"Capacity","values":[{"type":"stringLiteral","stringLiteral":"341"}]}]}},"UnavailabilityUpdateResource":{"oneOf":[{"allOf":[{"required":["name","type","reason","context","attributeConstraint"]},{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["TEMPORARILY_UNAVAILABLE","DISCONTINUED"]},"reason":{"type":"string"},"context":{"type":"array","items":{"$ref":"#/components/schemas/Context"}},"attributeConstraint":{"type":"array","items":{"$ref":"#/components/schemas/AttributeConstraint"},"minItems":1,"nullable":true}},"example":{"name":"Vistaprint US - Capacity Restriction","type":"TEMPORARILY_UNAVAILABLE","reason":"Legal Compliance Issue","context":[{"key":"Country","value":"US"},{"key":"Merchant","value":"VISTAPRINT"}],"attributeConstraint":[{"attributeKey":"Capacity","values":[{"type":"stringLiteral","stringLiteral":"341"}]}]}}]},{"allOf":[{"required":["name","type","reason","condition","attributeConstraint"]},{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["TEMPORARILY_UNAVAILABLE","DISCONTINUED"]},"reason":{"type":"string"},"condition":{"type":"array","items":{"$ref":"#/components/schemas/Condition"}},"attributeConstraint":{"type":"array","items":{"$ref":"#/components/schemas/AttributeConstraint"},"minItems":1,"nullable":true}},"example":{"name":"Vistaprint US - Capacity Restriction","type":"TEMPORARILY_UNAVAILABLE","reason":"Legal Compliance Issue","condition":[{"key":"fulfillmentLocationId","value":"kx3rje98"}],"attributeConstraint":[{"attributeKey":"Capacity","values":[{"type":"stringLiteral","stringLiteral":"341"}]}]}}]}]}},"securitySchemes":{"CimpressSecurity":{"type":"apiKey","name":"Authorization","in":"header","description":"Enter the token with the `Bearer: ` prefix, e.g. \"Bearer abcde12345\"."},"Cimpress-Security":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://cimpress.auth0.com/authorize?scope=openid+profile+email&audience=https%3a%2f%2fapi.cimpress.io%2f","scopes":{}}}},"auth0AccessToken":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://oauth.cimpress.io/authorize","scopes":{}}}},"Cimpress-Security-JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}}}