{"openapi":"3.1.0","info":{"title":"PUT /api/v1/catalog-items/{bundle_id}/components","version":"1.0.0","description":"Set a bundle's components"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/catalog-items/{bundle_id}/components":{"put":{"tags":["catalog-items"],"summary":"Set a bundle's components","description":"Replace a bundle's component set wholesale.","operationId":"set_bundle_components_api_v1_catalog_items__bundle_id__components_put","parameters":[{"name":"bundle_id","in":"path","required":true,"schema":{"type":"string","title":"Bundle Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-business-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Business-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BundleComponentsSetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope_BundleComponentsResponse_"}}}},"400":{"description":"Bad Request - Invalid input","content":{"application/json":{"example":{"detail":"Invalid request parameters"}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"example":{"detail":"Not authenticated"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"detail":"Not enough permissions"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"detail":"Resource not found"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"BundleComponentInput":{"properties":{"component_item_id":{"type":"string","title":"Component Item Id","description":"Catalog item in the bundle."},"qty":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Qty","description":"Quantity of this component.","default":"1"}},"type":"object","required":["component_item_id"],"title":"BundleComponentInput","description":"One component of a bundle on the set-components request."},"BundleComponentResponse":{"properties":{"component_item_id":{"type":"string","title":"Component Item Id"},"name":{"type":"string","title":"Name"},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku"},"unit_price":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Unit Price"},"billing_rule":{"type":"string","title":"Billing Rule","default":"flat"},"qty":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Qty"}},"type":"object","required":["component_item_id","name","qty"],"title":"BundleComponentResponse","description":"A resolved bundle component (its catalog item details + quantity)."},"BundleComponentsResponse":{"properties":{"bundle_id":{"type":"string","title":"Bundle Id"},"components":{"items":{"$ref":"#/components/schemas/BundleComponentResponse"},"type":"array","title":"Components"}},"type":"object","required":["bundle_id"],"title":"BundleComponentsResponse","description":"The exploded component list for a bundle catalog item."},"BundleComponentsSetRequest":{"properties":{"components":{"items":{"$ref":"#/components/schemas/BundleComponentInput"},"type":"array","title":"Components"}},"type":"object","title":"BundleComponentsSetRequest","description":"Replace a bundle's component set wholesale."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"SuccessEnvelope_BundleComponentsResponse_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"data":{"anyOf":[{"$ref":"#/components/schemas/BundleComponentsResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[BundleComponentsResponse]"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}