{"schema":"opensci.commercial_api.capabilities","schema_version":"10","service":{"id":"opensci.commercial_api","name":"OpenSci Commercial API","api_version":"v1","version":"1.0.0","api_base_url":"https://opensci-optics.com/api/v1"},"urls":{"portal_zh_cn":"https://opensci-optics.com/","portal_en":"https://opensci-optics.com/en/","capabilities":"https://opensci-optics.com/api/v1","openapi":"https://opensci-optics.com/api/v1/openapi.json","engine_distribution_manifest":"https://opensci-optics.com/distribution/opensci-engine/manifest.json","catalog_manifest":"https://opensci-optics.com/api/v1/catalog"},"start_here":{"summary":"Use the os-optics package: its client and command line call this API for you, open protected deliveries in memory, check assemblies, generate the Detailed Assembly Drawing and upload results. Call the raw routes (below) only when you need to.","python":"Python 3.11 or newer","install":"python -m pip install \"os-optics[protected]\"","install_from_this_service":"/distribution/opensci-engine/manifest.json (install.command installs exactly the build this service offers)","check_environment":"os-optics doctor","upgrade":{"when":"an os-optics older than this service accepts is installed (a submission is refused with ENGINE_VERSION_NOT_ACCEPTED): upgrade, move each saved Project to the current catalog, run it again, then submit","steps":["python -m pip install --upgrade \"os-optics[protected]\"","os-optics catalog sync","os-optics project update-catalog PROJECT --out PROJECT  (a component whose earlier release can no longer be obtained or read is moved and listed as unverified with the reason; if the status is NEEDS_ATTENTION, add --include-changed to move the changed components and those whose earlier release may still be obtained; then follow the report's next_steps)","os-optics project run PROJECT --out-dir RUN_DIR","submit the new run (os-optics resolve RUN_DIR)"],"note":"a Project saved by an older os-optics pins a catalog release this service no longer distributes: project update-catalog moves its components and lists them as unverified with the reason; if the status is NEEDS_ATTENTION, add --include-changed to move the changed components and those whose earlier release may still be obtained; then review the new Local Validation before submitting; for the upgrade, the same command applies to an installation under the earlier name opensci-engine; use the os-optics command afterwards"},"configure":{"OPENSCI_API_URL":"https://opensci-optics.com","credential":"OPENSCI_TOKEN, or OPENSCI_TOKEN_FILE, or the file ~/.opensci/token (written by os-optics account token create --save); never pass a token on the command line"},"python_client":{"import":"from os_optics.client import OpenSciClient","example":["client = OpenSciClient.from_environment()","client.token_status()","resolution = client.submit(run)","preview = client.assembly_preview(resolution_id)","client.addresses()  # the default address; client.add_address(...) when there is none","order = client.create_order(resolution_id)","client.report_bank_transfer(order_id)  # when the person who paid says it was made","client.withdraw_order(order_id)  # only when the person asks; before a transfer is reported","drawing = client.assembly_drawing(resolution_id)  # after OpenSci confirmed the payment","client.upload_assembly_results(resolution_id, validation=..., drawing=...)"]},"command_line":{"os-optics doctor":"check this installation, offline: Python, the package, the [protected] extra, the local catalog store, and whether OPENSCI_API_URL and an Account token are configured. It does not contact OpenSci or test the connection: 'os-optics catalog check' asks the catalog service, 'os-optics account status' checks the token with the service. On a fresh install it reports that the public catalog will be downloaded on first use (exit 0)","os-optics catalog":"status (local) | check (ask the service) | sync (download the current release and make it active) | sync --release V (fetch one retained release) | use V (select a stored release) | import FILE (offline computers) | verify","os-optics project update-catalog PROJECT --out PROJECT":"move a saved Project to the active catalog release","os-optics view RUN_DIR":"open the local 3D viewer of a run (--snapshot DIR for images)","os-optics account":"status | token create | token list | token revoke | token rotate --issuer-token-file FILE | address list | address add | logout","os-optics resolve RUN_DIR":"submit a run directory for commercial resolution ([--optics-only | --no-breadboard | --assembly-service] [--customer-supplied ID ...] [--spare SKU=N ...] [--max-board-size-mm X Y] [--require-all-retained-dofs])","os-optics layout draw PACKAGE --out DIR":"render an optical layout package into the Optical Layout Drawing (--locale zh-CN|en)","os-optics resolution show ID":"the Customer Purchase BOM and prices","os-optics assembly":"preview RESOLUTION_ID [--view] | drawing RESOLUTION_ID --out DIR","os-optics order":"create RESOLUTION_ID [--address ADDRESS_ID] [--additional-order] | show ORDER_ID | list | layout ORDER_ID --out DIR | report-transfer ORDER_ID | withdraw ORDER_ID","os-optics artifacts":"list RESOLUTION_ID | show SET_ID | download SET_ID ROLE --out FILE","os-optics feedback submit":"send OpenSci feedback: --category PROBLEM|FEATURE_REQUEST|DOCUMENTATION --summary TEXT --details-file FILE (see feedback)"},"agent":"Your own Agent uses this service with the token you give it."},"journey":[{"step":1,"name":"install os-optics and check the environment","where":"YOUR_MACHINE","requires":"Python 3.11 or newer","command":"python -m pip install \"os-optics[protected]\"","check":"os-optics doctor","note":"doctor is local and offline (it does not test the connection); exit 0 = ready.local_design (this installation runs a Project); ready.catalog says whether Projects with catalog products and the catalog commands can start. Already have an older os-optics? Follow start_here.upgrade"},{"step":2,"name":"browse the optical catalog","where":"YOUR_MACHINE","cli":"os-optics catalog list","python":"from os_optics.local import load_public_catalog","first_use":"os-optics catalog sync","note":"the catalog is versioned data downloaded from OpenSci (a few MB) into a local store: by the first command that needs it (one line on stderr says so) or now with os-optics catalog sync. Then design and simulation work offline. os-optics catalog status shows the active release; on a computer without access to OpenSci, copy a release file and run os-optics catalog import FILE"},{"step":3,"name":"build the Project","where":"YOUR_MACHINE","cli":"os-optics project example --kind <kind>","python":"os_optics.local.example_project_of_kind(kind)"},{"step":4,"name":"simulate and validate","where":"YOUR_MACHINE","cli":"os-optics project run PROJECT --out-dir RUN_DIR","python":"run = os_optics.local.run_optical_project(project)  # run.local_validation: what the run reported, met or not"},{"step":5,"name":"inspect the result in the local 3D viewer","where":"YOUR_MACHINE","cli":"os-optics view RUN_DIR","snapshots":"os-optics view RUN_DIR --snapshot DIR"},{"step":6,"name":"the person downloads an Agent token in Account","where":"YOUR_MACHINE","cli":"os-optics account status --token-file ACCOUNT_DOWNLOADED_FILE","note":"Sign in to your OpenSci Account website and create a SINGLE_USE, TIME_LIMITED or PERMANENT Agent token. Download the file once, and give its path to the Agent as OPENSCI_TOKEN_FILE. A single-use token still reads and tracks Orders after it places one. The Agent never needs an Account password or staff credential"},{"step":7,"name":"submit for commercial resolution, with the purchase options","where":"API","method":"POST","path":"/api/v1/commercial-submissions","scope":"commercial:resolve","cli":"os-optics resolve RUN_DIR","python":"client.submit(run)","options":{"--mechanics none|derived":"order option mechanical_supply (NONE = --optics-only)","--platform none|breadboard":"order option platform (NONE with derived mechanics = --no-breadboard)","--assembly customer|opensci":"order option assembly (OPENSCI = --assembly-service)","--mounting FILE":"customer_constraints.mounting {instance id: {beam_height_mm, incidence_deg?}}: only for a design_intent OPTICAL_SYSTEM Project bought with derived mechanics and platform none (the mounting sheet)","--optics-only":"customer_constraints.purchase_scope = OPTICS_ONLY: buy only the optical elements the design selected -- no mounts, posts, holders or breadboard; the person mounts them in their own mechanics, guided by the relative Optical Layout Drawing (no assembly service)","--no-breadboard":"customer_constraints.include_breadboard = false: use your own optical table (M6 holes on a 25 mm grid) instead of the OpenSci breadboard","--assembly-service":"customer_constraints.assembly_service = true: OpenSci assembles and aligns the system on the OpenSci breadboard and delivers it assembled","--customer-supplied ID":"customer_constraints.customer_supplied_components: a design component the person already owns (repeatable); not on the Purchase BOM","--require-all-retained-dofs":"refuse the resolution unless every retained DOF is delivered as requested (RETAINED_DOF_UNSATISFIED otherwise)","--spare SKU=N":"customer_constraints.spare_units: N spare units of an OpenSci optic of the design (separate lines, not part of the assembly; repeatable)","--max-board-size-mm X Y":"customer_constraints.max_board_size_mm: the largest breadboard (or free area of your table) the layout may use"},"note":"ask the person which options they want; submit again with other options to compare the prices. Before ordering, show them: resolution.design_deviations (what the delivered hardware does differently from the design, with reasons), resolution.agreement (the clauses they accept by ordering; resolution show --locale renders them), the deliverables and design_orders (Orders of this design they already have)"},{"step":8,"name":"read the Customer Purchase BOM, prices, shipping and delivery terms","where":"API","method":"GET","path":"/api/v1/resolutions/{resolution_id}","scope":"commercial:resolve","cli":"os-optics resolution show RESOLUTION_ID"},{"step":9,"name":"inspect the Experimental Lab Assembly","where":"API","method":"POST","path":"/api/v1/resolutions/{resolution_id}/assembly-preview-deliveries","scope":"commercial:assembly-preview:read","cli":"os-optics assembly preview RESOLUTION_ID --view","python":"preview = client.assembly_preview(resolution_id); client.validate_assembly(preview)"},{"step":10,"name":"create the Order, shipped to the chosen or default address","where":"API","method":"POST","path":"/api/v1/orders","scope":"commercial:order:place","idempotency_key":true,"cli":"os-optics order create RESOLUTION_ID [--address ADDRESS_ID] [--additional-order]","shipping_address":{"list":"GET /api/v1/account/addresses (os-optics account address list)","add":"POST /api/v1/account/addresses (os-optics account address add ...)"},"billing_title":{"list":"GET /api/v1/account/billing-titles","add":"POST /api/v1/account/billing-titles","order":"billing_title_id in the body; left out: the default title, else the account name"},"note":"the token's commercial:order:place scope authorizes the Agent to create the Order. First ask the person which shipping address to use (mainland China): the default one, another one of the address book, or a new one you add; and which billing title the quotation and agreement should name: the default one, another one, or a new one you add; then present the Order Number, total, shipping address, billing title and bank-transfer instructions to the person who pays","withdraw":{"when":"only when the person asks to withdraw the Order, or to change the design after ordering (withdraw, run the design again, order again); only before a transfer is reported","method":"POST","path":"/api/v1/orders/{order_id}/withdrawal","scope":"commercial:order:place","cli":"os-optics order withdraw ORDER_ID","then":"the Order and its data are deleted: tell the person it was withdrawn"}},{"step":11,"name":"pay by corporate bank transfer","where":"PERSON","note":"the full amount, with exactly the Order Number as the transfer remark"},{"step":12,"name":"report the transfer","where":"API","method":"POST","path":"/api/v1/orders/{order_id}/bank-transfer-reports","scope":"commercial:payment:report","idempotency_key":true,"cli":"os-optics order report-transfer ORDER_ID","note":"only when the person who paid says the transfer was made; the payment becomes PENDING_CONFIRMATION"},{"step":13,"name":"OpenSci confirms receipt","where":"OPENSCI","note":"payment.state becomes CONFIRMED once OpenSci has received the full amount; only OpenSci confirms"},{"step":14,"name":"generate the Detailed Assembly Drawing locally and upload it","where":"API","method":"POST","path":"/api/v1/resolutions/{resolution_id}/assembly-detail-deliveries","scope":"commercial:assembly-detail:read","cli":"os-optics assembly drawing RESOLUTION_ID --out DIR","then":"POST /api/v1/artifact-sets (validation result, then drawing)"},{"step":15,"name":"read the artifacts back","where":"API","method":"GET","path":"/api/v1/resolutions/{resolution_id}/artifact-sets","scope":"commercial:assembly-artifact:read","cli":"os-optics artifacts list RESOLUTION_ID"}],"authentication":{"scheme":"Bearer","header":"Authorization: Bearer <token>","token_format":"oat_<32 hex>_<64 hex>","scopes":{"commercial:resolve":"Submit a Project with the record of its local run -- or a list of OpenSci part numbers -- and read its resolution: the Customer Purchase BOM, current prices and assembly notes; list the mechanical products; read a resolution's mounting sheet.","commercial:assembly-preview:read":"Obtain the Experimental Lab Assembly preview of a resolution.","commercial:order:place":"Create the Order of a resolution. A token carrying this scope is the customer's authorization for the Agent to create the Order, and to withdraw it while it is unpaid and no transfer was reported. It also lists and adds the shipping addresses an Order ships to, and lists, adds, changes and deletes the billing titles an Order names.","commercial:order:read":"Read Orders, their quotation, agreement, bank-transfer instructions and payment state, in zh-CN or en; list the shipping addresses and the billing titles.","commercial:payment:report":"Report that the corporate bank transfer was made, when the person who paid says so.","commercial:assembly-detail:read":"Obtain the Assembly Detail once OpenSci has confirmed the Order's payment; with it the Detailed Assembly Drawing is generated locally.","commercial:assembly-artifact:write":"Upload assembly validation results and Detailed Assembly Drawings.","commercial:assembly-artifact:read":"Read uploaded assembly artifacts back.","account:token:manage":"The Account owner's credential: list, issue and revoke tokens of the same Account member. It grants no commercial capability by itself."},"capability_of_scope":{"resolve":"commercial:resolve","view_assembly_preview":"commercial:assembly-preview:read","place_order":"commercial:order:place","read_orders":"commercial:order:read","report_bank_transfer":"commercial:payment:report","obtain_assembly_detail":"commercial:assembly-detail:read","upload_artifacts":"commercial:assembly-artifact:write","read_artifacts":"commercial:assembly-artifact:read","manage_tokens":"account:token:manage"},"capabilities_of_every_token":{"send_feedback":"send feedback to OpenSci (POST /api/v1/feedback): any active Account token, Agent or Review profile; no scope is needed"},"profiles":{"agent":{"scopes":["commercial:resolve","commercial:assembly-preview:read","commercial:assembly-detail:read","commercial:assembly-artifact:write","commercial:assembly-artifact:read","commercial:order:place","commercial:order:read","commercial:payment:report"],"grants":"Every customer commercial capability: resolve, Assembly Preview, create and read Orders, report a bank transfer, Assembly Detail, upload and read artifacts. The usual token for a customer's Agent."},"review":{"scopes":["commercial:resolve","commercial:assembly-preview:read","commercial:order:read","commercial:assembly-artifact:read"],"grants":"Resolve, view the Experimental Lab Assembly, read Orders and artifacts; cannot create Orders or report payments."}},"owner_credential":"For the secondary bearer-management API, account:token:manage stays with the Account owner; the owner may use it to issue the Agent's token (os-optics account token create --profile agent --save --token-file OWNER_CREDENTIAL_FILE, or POST /api/v1/account/tokens). Pass it with --token-file only for token commands, so the Agent's commands keep using the Agent token. A token issued this way never carries account:token:manage. A bounded issuer cannot issue a permanent token.","lifecycle":{"SINGLE_USE":"At most one successful new Order; bounded expiry; idempotent retry returns the original Order and order-read remains available until expiry or revocation","TIME_LIMITED":"Expires in 1 to 720 hours","PERMANENT":"No expiry; effective until revoked"},"lifetime":"1 to 720 hours for SINGLE_USE and TIME_LIMITED; none for PERMANENT","check":"GET /api/v1/account/token shows a token's organization, lifecycle, consumption, scopes, capabilities and optional expiry","rotation":"issue a new token, switch the Agent to it, then revoke the old one (os-optics account token rotate --issuer-token-file OWNER_CREDENTIAL_FILE does all three: the owner credential issues the replacement, which is stored where the old token was read from)","revocation":"DELETE /api/v1/account/token revokes the presented token; DELETE /api/v1/account/tokens/{token_id} revokes any of your tokens. Revocation is immediate; revoke at once if a token may have been exposed","properties":["scoped: no scope implies another","expiring","revocable, immediately","bound to one Account member and organization"],"never":["put a token in a URL","log, print or echo a token","ask anyone for a password"]},"idempotency":{"header":"Idempotency-Key","format":"1-160 printable ASCII characters, chosen by the client","required_for":["POST /api/v1/account/tokens","POST /api/v1/account/addresses","POST /api/v1/account/billing-titles","POST /api/v1/feedback","POST /api/v1/commercial-submissions","POST /api/v1/part-list-submissions","POST /api/v1/orders","POST /api/v1/orders/{order_id}/bank-transfer-reports","POST /api/v1/artifact-sets"],"replay":"a retry with the same key and the same body returns the original result with replayed: true and HTTP 200 (a new result is 201 with replayed: false); the same key with another body is 409 IDEMPOTENCY_KEY_CONFLICT. Use a new key for every new request","deliveries":"protected deliveries take no key: each call issues a new delivery"},"commercial_rules":{"purchase_limits":{"max_part_lines":64,"max_line_quantity":100,"max_spare_products":32,"max_spare_units":20,"meaning":"the most part-list lines, units of one part-list line, spare products and spare units of one product a request may state; above a limit the request is SUBMISSION_SCHEMA_INVALID with details.limits [{field, limit, requested}]"},"resolution":"A resolution states the Customer Purchase BOM with current prices, the delivery of each retained adjustment, the assembly notes and the delivery terms. The BOM includes the Shipping line (always) and the OpenSci assembly and alignment service line (when chosen); every price is computed by OpenSci and shown before the Order is created. It creates no Order and no obligation.","order_options":{"field":"resolution.order_options / order.order_options (view 6 / Order view 8)","basis":"DESIGN (a Project with the record of its local run, POST /commercial-submissions) or PART_LIST (OpenSci part numbers and quantities, POST /part-list-submissions)","optics_source":"CATALOG (OpenSci catalog products); CUSTOM is on hold: 422 ORDER_OPTION_ON_HOLD","mechanical_supply":"NONE (no mounting hardware) or DERIVED (OpenSci selects mount, post and post holder for every optic it supplies)","platform":"NONE or BREADBOARD (the OpenSci breadboard sized and drilled for a design's laboratory layout); INTEGRATED_BASE is on hold (ORDER_OPTION_ON_HOLD). With a part list a breadboard is an ordinary listed line","assembly":"CUSTOMER or OPENSCI (needs a design with derived mechanics, the breadboard and every inline optic supplied by OpenSci)","presets":"a design's customer_constraints encode the options: purchase_scope OPTICS_ONLY = NONE / NONE / CUSTOMER; COMPLETE_SYSTEM with include_breadboard false = DERIVED / NONE / CUSTOMER; with the breadboard = DERIVED / BREADBOARD; assembly_service true = OPENSCI. Existing requests are unchanged","checks":"optical validation iff basis DESIGN; part-to-part compatibility (mount holds the optic, post and holder fit, the beam height is reachable) iff mechanical_supply DERIVED; layout checks (collisions, beam clear, board fit) iff DERIVED with a laboratory layout; supply and per-part prices always","deliverables":"ASSEMBLY_PREVIEW + DETAILED_ASSEMBLY_DRAWING (a design with derived mechanics and a layout), OPTICAL_LAYOUT_DRAWING (a design with mechanics NONE), MOUNTING_SHEET (mounts OpenSci derived without a layout: a part list with mechanics DERIVED and at least one optic line, or an OPTICAL_SYSTEM design); a part list without derived mounts (mechanics NONE, or no optic line) has none besides its lines. An Order lists exactly the deliverables of its resolution","optical_system":"a Project with design_intent OPTICAL_SYSTEM has no laboratory layout: platform BREADBOARD, a board limit or assembly OPENSCI is 422 DESIGN_INTENT_HAS_NO_LAB_ASSEMBLY (details.conflicting_options). With derived mechanics give customer_constraints.mounting {instance id: {beam_height_mm, incidence_deg?}} for every optic OpenSci supplies (422 MOUNTING_INPUT_REQUIRED, details.instance_ids, otherwise); an entry for any other id is 422 PURCHASE_OPTIONS_CONFLICT (details.instance_ids); mounting on a laboratory-assembly design is PURCHASE_OPTIONS_CONFLICT","part_list":"lines 1..64 {line_id, opensci_sku, quantity 1..100}: ORDERABLE OS-OPT-* catalog optics and the OS-MECH-* products of GET /mechanical-products; any other part number is 422 PART_NOT_ORDERABLE (details.line_ids, recovery LIST_MECHANICAL_PRODUCTS), the same answer whether or not it exists. mechanical_supply DERIVED needs mounting {line_id: {beam_height_mm, retained_dofs?, incidence_deg?}} for every optic line (422 MOUNTING_INPUT_REQUIRED, details.line_ids) and none for other lines; NONE takes no mounting (PURCHASE_OPTIONS_CONFLICT). The incidence defaults to 45 deg for a mirror or plate beam splitter, else 0; retained DOFs default to none. One chain per optic unit; when the best mount cannot reach the height the other compatible mounts are tried; an optic that cannot be held as stated is 422 MOUNTING_NOT_AVAILABLE (details.items: line_id, reason HEIGHT_OUT_OF_RANGE | NO_COMPATIBLE_MOUNT | DOF_NOT_DELIVERABLE, reachable_axis_height_mm / reachable_range_mm when known). Beam heights are measured from the surface the post holders stand on; OpenSci hardware spans 25 to 400 mm","agreement":"a part-list Order adds the clause PART_LIST_NOT_VERIFIED_AS_SYSTEM: OpenSci supplies the listed products and has not checked that they work together as an optical system (for derived mounts only that each optic's mount, post and holder fit at the stated height)"},"purchase_options":{"field":"customer_constraints","purchase_scope":"COMPLETE_SYSTEM (default): the optics and the mounting hardware OpenSci configures for them. OPTICS_ONLY: only the optical elements the design selected -- the same products, no mounts, posts, holders, positioning hardware or breadboard, no assembly service (resolution.assembly_service.unavailable_reason_code OPTICS_ONLY_PURCHASE); every retained DOF is the person's own mounting (dof_delivery status CUSTOMER_MOUNTING); delivery_mode OPTICS_ONLY; deliverable: the Optical Layout Drawing (GET .../optical-layout, relative positions, no absolute height). Use it when the person has (or designs) their own mechanics, or when OpenSci cannot mount the design. With OPTICS_ONLY, include_breadboard = true or assembly_service = true is 422 PURCHASE_OPTIONS_CONFLICT. A Project designed as an optical system (design_intent OPTICAL_SYSTEM: no laboratory layout) is bought with OPTICS_ONLY or with COMPLETE_SYSTEM, include_breadboard = false and a mounting entry per optic (OpenSci-derived mounts, the mounting sheet; order_options.optical_system); with the breadboard or the assembly service it is 422 DESIGN_INTENT_HAS_NO_LAB_ASSEMBLY (recovery CHOOSE_OPTICS_ONLY). A Project without design_intent is a laboratory assembly","include_breadboard":"true (default): the OpenSci breadboard chosen for your layout is a BOM line. false: you use your own optical table (M6 holes on a 25 mm grid); no breadboard line, the layout, preview and drawing still follow that grid, and the standard M6 fixing screws are still included","assembly_service":"false (default). true: OpenSci assembles and aligns the system on the OpenSci breadboard and delivers it assembled (a fee line, longer lead time)","conflict":"assembly_service = true with include_breadboard = false is refused: 422 ASSEMBLY_SERVICE_REQUIRES_BREADBOARD (recovery FIX_REQUEST); nothing is changed for you","customer_supplied_components":"instance ids of design components you supply yourself (e.g. optics you already own): they stay in the design, the assembly is resolved with them in place, but they are not on the Customer Purchase BOM. An id that is not a component of the Project is 422 CUSTOMER_SUPPLIED_COMPONENT_UNKNOWN","spare_units":"{OpenSci SKU: count}: extra units of optical products OpenSci supplies for this design, bought as spares (lines P01.., category SPARE_OPTICAL_ELEMENT, not part of the assembly or its drawings); another product is 422 SPARE_UNITS_INVALID","beam_height":"not an option of a laboratory assembly: derived from the optical design (an unknown top-level field such as beam_height_mm is 422 SUBMISSION_SCHEMA_INVALID). Without a layout the beam height of each optic is stated in its mounting entry (customer_constraints.mounting of an OPTICAL_SYSTEM design; mounting of a part list)"},"beam_height":"Where the beam height is reported (the height to set up your own equipment at): resolution.frame.optic_axis_heights gives each OpenSci optic's axis_height_mm above the breadboard top (above the top of your own optical table with include_breadboard = false); resolution.customer_supplied_components[].axis_height_mm the height of each of your own components' design position (for your light source, where its beam starts). The localized resolution and Order (?locale=zh-CN|en) state it for people: summary field optic_axis_height and the notes on your own equipment. The Order keeps it as assembly.optic_axis_heights","customer_supplied":"Components OpenSci does not supply are not refused: resolution.customer_supplied_components lists each one apart from the Customer Purchase BOM (which holds only what OpenSci supplies) with reason_code CUSTOMER_LIGHT_SOURCE, NOT_IN_CATALOG, NOT_ORDERABLE (simulation-only product), TEMPORARILY_UNAVAILABLE or CUSTOMER_OWNED (marked by you). They are outside OpenSci's delivery and warranty; the assembly keeps their design position and, for a catalog product or a component whose Project declares its optical model (optical_models, optical_model_id: your own lens, mirror, aperture stop or multi-element unit, simulated like a catalog optic), reserves their space and beam path. A declared model whose frame or ports do not say where the beam leaves it is 422 DECLARED_OPTIC_BEAM_PATH_UNDEFINED for a complete system (details name the component, its model and the field to declare). Assembly-service eligibility follows each component's role: a customer-supplied component of the inline optical train (lens, mirror, splitter, filter, window, polarizer, waveplate, prism, or an aperture / other optic the beam continues through to OpenSci optics) makes the design self-assembly only: resolution.assembly_service.available is false (reason CUSTOMER_SUPPLIED_INLINE_OPTICS, customer_supplied_components names them) and assembly_service = true is 422 ASSEMBLY_SERVICE_UNAVAILABLE (recovery FIX_REQUEST). External equipment you connect -- your light source, detectors (camera, spectrometer, power meter), beam dumps -- does not: OpenSci assembles the optics it supplies and aligns their designed input and output axes. A paid self-assembly Order still gets the Detailed Assembly Drawing, with each customer-supplied component drawn as a labelled placeholder at its design position. A design in which OpenSci supplies nothing is refused. An ORDERABLE optic OpenSci has no mount for (its catalog opensci_mounting is not AVAILABLE) is supplied unmounted in a design bought with OpenSci mechanics: its Customer Purchase BOM line carries notices [SUPPLIED_UNMOUNTED], you mount it at its design position (its space and beam path are kept clear), and the assembly service is not offered (reason OPENSCI_OPTICS_SUPPLIED_UNMOUNTED, assembly_service.unmounted_optics names them); a line delivered in its manufacturer's housing carries HOUSED_PRODUCT","delivery":"resolution.delivery_terms: region CN_MAINLAND (mainland China only), currency CNY, lead_time_working_days counted from OpenSci's payment confirmation, delivery_mode SELF_ASSEMBLY (a kit of parts), OPENSCI_ASSEMBLY, OPTICS_ONLY or COMPONENTS (separate parts, unassembled, without a layout or assembly drawing: a part list, or an optical system with derived mounts; agreement clause COMPONENTS_SUPPLIED_UNASSEMBLED); the Order fixes them in its terms","before_ordering":"the resolution states everything the Order will fix: purchase_options (what OpenSci supplies), the Customer Purchase BOM, design_deviations (each retained DOF the delivered hardware provides otherwise than the design asks, with not_delivered_reason NO_COMPATIBLE_HARDWARE | HARDWARE_DID_NOT_FIT | NOT_COMBINABLE_WITH_OTHER_DOFS | SLOT_NOT_ALONG_AXIS and, for a fit problem, limited_by {reason, with}), agreement (the quotation terms, notices and the agreement's clause_codes; the localized presentation renders the clauses), order_options, deliverables (ASSEMBLY_PREVIEW, DETAILED_ASSEMBLY_DRAWING after payment confirmation, OPTICAL_LAYOUT_DRAWING or MOUNTING_SHEET) and design_orders (the organization's Orders of the same design)","after_sales":"the Order agreement states the acceptance, returns, warranty and specification terms as clauses (contract.clause_codes; presented in zh-CN or en)","shipping_address":{"book":"GET /api/v1/account/addresses lists the organization's addresses (scope commercial:order:place or commercial:order:read), the default first; POST adds one (scope commercial:order:place). At most 20; editing and deleting is done on the Account website","fields":"recipient_name, mobile_phone (11 digits, 13-19...), province (a mainland province-level division in Chinese), city, district, street_address, optional postal_code (6 digits) and label","provinces":["北京市","天津市","上海市","重庆市","河北省","山西省","辽宁省","吉林省","黑龙江省","江苏省","浙江省","安徽省","福建省","江西省","山东省","河南省","湖北省","湖南省","广东省","海南省","四川省","贵州省","云南省","陕西省","甘肃省","青海省","内蒙古自治区","广西壮族自治区","西藏自治区","宁夏回族自治区","新疆维吾尔自治区"],"order":"POST /api/v1/orders ships to shipping_address_id, or to the default address without it; with no address at all: 409 SHIPPING_ADDRESS_REQUIRED (recovery ADD_SHIPPING_ADDRESS)","snapshot":"the Order copies the address (order.shipping_address; also on the quotation and the agreement); later changes of the address book never change a placed Order","idempotency":"a retry of POST /api/v1/orders with the same Idempotency-Key and the same body (resolution_id and shipping_address_id) returns the first Order; the same key with another address is 409 IDEMPOTENCY_KEY_CONFLICT","privacy":"addresses are personal data: show them only to the person you work for; never log them"},"billing_title":{"book":"GET /api/v1/account/billing-titles lists the organization's billing titles (单位抬头: the customer its quotations and agreements name; scope commercial:order:place or commercial:order:read), the default first; POST adds one, PATCH /{billing_title_id} changes it, DELETE /{billing_title_id} deletes it, PUT /{billing_title_id}/default makes it the default (scope commercial:order:place). At most 20; the first title becomes the default; deleting the default makes the newest remaining title the default","fields":{"kind":"required: ORGANIZATION (a company, university or institute) or INDIVIDUAL (a person)","name":"required: 1-200 characters, the full name as the documents show it","taxpayer_id":"optional: unified social credit code or taxpayer number; letters and digits, hyphens between groups, at most 40; spaces removed, letters upper-cased","address":"optional: at most 200 characters","phone":"optional: digits, spaces, +, - and parentheses, at most 40","bank_name":"optional: the bank and branch, at most 100 characters","bank_account":"optional: digits grouped by spaces or hyphens, at most 40"},"invalid":"422 BILLING_TITLE_INVALID names the refused fields in details.invalid_fields (never their values)","order":"POST /api/v1/orders names billing_title_id, or the default title without it; with no title at all the quotation and agreement name the account name (an Order is never refused for it). Another organization's or a deleted title is 404 BILLING_TITLE_NOT_FOUND","snapshot":"the Order copies the title (order.customer.billing_title; the quotation's customer and the agreement's CUSTOMER party name it); later changes or deletion of the title never change a placed Order","idempotency":"billing_title_id is part of the request an Order's Idempotency-Key is bound to: the same key with another, an added or a dropped billing_title_id is 409 IDEMPOTENCY_KEY_CONFLICT; a request without it keeps the binding it always had","privacy":"a title can name a person and carries business data: show the titles only to the person you work for; never log them"},"order":"POST /api/v1/orders with {\"resolution_id\": ...} (and optionally \"shipping_address_id\" and \"billing_title_id\"). A token carrying commercial:order:place is the customer's authorization for the Agent to create the Order. The Order fixes the lines (with the service lines), quantities, prices, total, assembly notes, delivery terms, shipping address and billing title, and returns the Order Number (OS-ORD-...), the quotation (OS-QUO-...), the agreement (OS-CON-...), the bank-transfer instructions and the next steps. Present them to the person who pays.","order_view":"GET /api/v1/orders/{order_id} returns opensci.commercial.customer_order schema_version 9: basis and order_options, customer (organization_display_name and billing_title: kind, name, taxpayer_id, address, phone, bank_name, bank_account; null for an Order created before billing titles), the lines, quotation (quotation.terms.delivery), agreement, payment, shipping_address, assembly (purchase: purchase_scope, breadboard, assembly service and why it was not offered; dof_delivery with not_delivered_reason; customer_supplied_components with modelled_as and outside_board_by_mm), fulfillment (status, delivery_mode, shipment_status, deliveries), deliverables (kind, status, command), next_steps and available_actions (REPORT_BANK_TRANSFER, WITHDRAW_ORDER); integrity.project_hash / local_validation_hash are null for a part-list Order (integrity.part_list_digest names its list). An OPENSCI_ASSEMBLY Order ships only after OpenSci has completed its assembly and alignment","one_open_order_per_resolution":"a resolution has at most one unpaid Order (409 RESOLUTION_HAS_OPEN_ORDER names it); once its payment is confirmed or it is cancelled, the resolution can be ordered again","one_order_per_design":"when your organization already has an Order of the same design (any resolution of the same Project, not cancelled; resolution answers list them as design_orders), POST /api/v1/orders is 409 DESIGN_ALREADY_ORDERED (details.orders, recovery CONFIRM_ADDITIONAL_ORDER) unless the body says additional_order: true. Ask the person before buying a design again","payment":"the full amount by corporate bank transfer to the payee in the Order, with exactly the Order Number as the transfer remark","transfer_report":"report the transfer only when the person who paid says it was made; a report is not a confirmation","confirmation":"only OpenSci confirms receipt of the payment; then the Assembly Detail is available and fulfillment starts","signature":"nothing in the Order depends on a signature; a signed agreement copy can be exchanged with OpenSci when the customer's purchasing process needs one","cancellation":"OpenSci may cancel an unpaid Order (for example a duplicate). Without a reported transfer it is deleted like a withdrawal; with one it becomes CANCELLED: final, nothing is due and nothing can be paid or reported for it","withdrawal":{"route":"POST /api/v1/orders/{order_id}/withdrawal (scope commercial:order:place; no Idempotency-Key)","allowed":"while the Order is unpaid and no transfer was reported for it: available_actions lists WITHDRAW_ORDER","refused":"after a reported transfer or a payment: 409 ORDER_NOT_WITHDRAWABLE (recovery CONTACT_OPENSCI)","deletes":"the Order, its quotation, agreement, payment and shipping-address copy; its resolution, design submission, deliveries and artifacts unless another Order names them. Nothing of it is kept; its Order Number is never reused, so Order Numbers have gaps","after":"the Order is gone: reading or withdrawing it again is 404 ORDER_NOT_FOUND (the stable answer to a repeated call). Tell the person it was withdrawn","change_a_design":"withdraw, run the design again, then order again"},"retention":"OpenSci keeps only Orders that are unpaid-and-open or paid. A resolution that was priced but never ordered is deleted after 7 days: submit the design again to order it later"},"actions":{"REPORT_BANK_TRANSFER":{"method":"POST","path":"/api/v1/orders/{order_id}/bank-transfer-reports","scope":"commercial:payment:report","idempotency_key":true,"body":{}},"WITHDRAW_ORDER":{"method":"POST","path":"/api/v1/orders/{order_id}/withdrawal","scope":"commercial:order:place","idempotency_key":false,"body":{}}},"payment":{"method":"CORPORATE_BANK_TRANSFER","instructions":"in the Order (GET /api/v1/orders/{order_id}): payee, bank, account, amount, currency and the exact transfer remark (the Order Number)","transfer_reference_rule":"EXACT_ORDER_NUMBER_AS_TRANSFER_REMARK","confirmation_mode":"OPENSCI_CONFIRMS_RECEIPT","states":{"AWAITING_TRANSFER":"the Order was created; transfer the full amount","PENDING_CONFIRMATION":"the transfer was reported; OpenSci confirms receipt","TRANSFER_BEING_CLARIFIED":"OpenSci could not match the transfer yet and is clarifying it","CONFIRMED":"OpenSci received the full amount; final","CANCELLED":"OpenSci cancelled the unpaid Order; final, nothing is due"},"customer_report_is_confirmation":false,"customer_can_confirm":false},"protected_delivery":{"response_schema":"opensci.commercial_api.protected_delivery","open_with":"OpenSciClient.assembly_preview / assembly_detail (or os_optics.protected_delivery.open_preview_delivery / open_detail_delivery)","grant":"a short-lived secret: keep it in memory, never log or store it; request a new delivery when it expired","storage":"the helpers keep opened packages in memory; they write only what you derive (validation results, drawings, snapshots) or explicitly export","detail_release":"the Assembly Detail is available once OpenSci has confirmed the payment of an Order of the resolution"},"local_compute":{"on_your_machine":["optical design","optical simulation","Local Validation","Optical Simulation 3D view","Experimental Lab Assembly check and 3D view","Detailed Assembly Drawing"],"on_the_service":["Account and tokens","commercial resolution","Orders and payment state","protected deliveries","artifact storage"]},"localization":{"locales":["zh-CN","en"],"presentation_routes":["/api/v1/resolutions/{resolution_id}/presentation?locale=","/api/v1/orders/{order_id}/presentation?locale=","/api/v1/orders/{order_id}/quotation/presentation?locale=","/api/v1/orders/{order_id}/contract/presentation?locale=","/api/v1/orders/presentation?locale="],"note":"codes, identifiers, amounts and Order Numbers are language-neutral; labels and text are translated"},"feedback":{"route":"POST /api/v1/feedback","command":"os-optics feedback submit --category PROBLEM|FEATURE_REQUEST|DOCUMENTATION --summary TEXT --details-file FILE","authentication":"any OpenSci Account token (Agent or Review profile)","limits":{"per_token_per_hour":10,"per_organization_per_day":50,"summary_chars":200,"details_chars":8000},"when":"something in OpenSci (os-optics, this API, the catalog or the instructions) kept you from serving your user's need, or your user needs a capability OpenSci lacks, or the instructions were unclear or wrong; after an Order, feedback about it names the Order (the order create output of os-optics shows the command with --order-id). Feedback is always optional and separate from the Order","categories":{"PROBLEM":"something did not work as described","FEATURE_REQUEST":"something the user needed is missing","DOCUMENTATION":"the instructions were unclear, missing or wrong"},"details":"what the user needed, what you did (commands), what happened (error code, request_id) and what you expected","rules":["send only what helps OpenSci fix or improve the product","never include tokens, passwords, payment data or personal data of the user beyond what the problem needs","one problem or suggestion per submission","tell the user what you sent"],"answer":"201 with feedback_id; a retry with the same Idempotency-Key and body returns 200 with replayed: true; an invalid field, or text containing a credential, is 422 FEEDBACK_INVALID (details.reason INVALID_FIELDS or CONTAINS_CREDENTIAL, details.invalid_fields; nothing is stored); over a limit: 429 FEEDBACK_RATE_LIMITED with Retry-After (recovery RETRY_LATER). Feedback is not read back through this API"},"errors":{"body":{"error":{"code":"<stable code>","family":"<family>","message":"<text>","details":{},"recovery":"<recovery code>"},"request_id":"<id>"},"recovery":{"NONE":"nothing to do: the requested state already holds, or the answer is final","FIX_REQUEST":"change the request (body, parameters, identifiers or headers), then send it again","RETRY":"send the same request again later","RETRY_WITH_SAME_KEY":"send the same request again with the same Idempotency-Key","USE_NEW_IDEMPOTENCY_KEY":"this Idempotency-Key belongs to another request: use a new key","PROVIDE_TOKEN":"send a valid Account token (Authorization: Bearer oat_...)","REQUEST_NEW_TOKEN":"use another valid token from Account; an expired, revoked or consumed ordering token cannot place a new Order","REQUEST_SCOPE":"use a token that carries the scope this operation needs","WAIT_FOR_PAYMENT_CONFIRMATION":"OpenSci has not confirmed the payment yet: try again after it has","CREATE_ORDER_FIRST":"create the Order of the resolution first","REQUEST_NEW_DELIVERY":"the delivery grant expired: request a new delivery","CONTACT_OPENSCI":"contact OpenSci and quote the request_id","ADD_SHIPPING_ADDRESS":"the Order needs a shipping address: ask the person for one, add it (POST /api/v1/account/addresses), then create the Order again","RETRY_LATER":"the service is busy, or a limit was reached, and did nothing: send the same request, with the same Idempotency-Key, after the Retry-After seconds","ADJUST_COMPONENT_SPACING":"apply the first of these that details.suggestion gives: move details.suggestion.instance_id (else details.instance_id) to suggested_position_design_mm, with the components in moved_with moved by the same offset; or set each component and observation plane in suggested_positions_design_mm to its position (the design is laid out at them; suggested_positions_tightness: AT_LEAST_SPACING, every widened gap is at the least spacing measured for its two supports; COMPACTED, each widened gap was reduced until the next 0.5 mm no longer resolved, a tighter layout may exist; NOT_COMPACTED, a tighter layout may exist; NOT_CONFIRMED, the resolution did not confirm them within its allowance, so another refusal may follow); or widen every pair in conflicting_pairs: move its instance_id with its moved_with along its beam_direction_design by min_support_pitch_mm minus spacing_mm (the moves add up; with pairs_confirmed true the design is laid out with all of them; with pairs_confirmed false min_support_pitch_mm is not confirmed: at most the spacing at which the two supports cannot meet, and it can be more or less than the design needs; a pair marked linked changes the spacing of a lens or curved mirror and the next one or observation plane, so the optics change); or move the named component along beam_direction_design, away from details.with, by min_extra_spacing_mm (with moved_with). For RETAINED_DOF_UNSATISFIED, details.suggestion is the move of the retained_dofs[].fallback_cause that gives the most to apply. Re-run the Local Validation, submit again","MOVE_COMPONENT_OFF_BEAM":"move the named component's hardware out of the other beam: to the positions in details.suggestion as for ADJUST_COMPONENT_SPACING, or by details.suggestion.min_lateral_clearance_mm along free_direction_design with the components in moved_with; re-run, submit again","ADJUST_COMPONENT_HEIGHT":"change the named component's height within details.suggestion's reachable range, re-run, submit again","RELAX_RETAINED_DOF":"drop or relax the retained DOFs listed in details (or submit without require_all_retained_dofs to accept the hardware as delivered), submit again","REDUCE_TILT":"reduce the named optic's tilt to its beam to at most details.suggestion.max_incidence_deg, re-run, submit again","CHANGE_COMPONENT":"choose another optical product for the named component, re-run, submit again","ALLOW_LARGER_BREADBOARD":"allow a larger breadboard (details.suggestion.smallest_fitting_board_mm, the smallest board the layout was found on; else smallest_board_for_footprint_mm, the smallest board that takes its footprint with any of its compatible mounts) or make the layout smaller, submit again","SIMPLIFY_DESIGN":"spread out or simplify the design; details name the most informative failure found","UPDATE_CATALOG_AND_RERUN":"the design's catalog release is no longer current for its products: synchronize the local catalog (os-optics catalog sync), update the Project to the current release, run it again locally, then submit","CHOOSE_ANOTHER_PRODUCT":"a product of the design cannot be supplied right now: choose another product (details name it) or try again later","RESUBMIT_DESIGN":"products of this resolution can no longer be supplied at the resolved price, or the Order agreement it states changed (details.reason AGREEMENT_CHANGED): submit the design again (os-optics resolve RUN_DIR with the same run) and order the new resolution","UPGRADE_ENGINE_AND_RERUN":"the design's record names an engine version this service does not accept (details.accepted_engine_versions): upgrade (details.upgrade_command), run os-optics catalog sync and os-optics project update-catalog PROJECT --out PROJECT, run the Project again, then submit the new run (details.next_steps; start_here.upgrade)","CONFIRM_ADDITIONAL_ORDER":"your organization already has an Order of this design (details.orders): show it to the person; only if they want to buy the design again, create the Order with additional_order: true (os-optics order create ID --additional-order)","USE_OPTICAL_LAYOUT":"this resolution buys the optical elements only: there is no assembly preview or detail; use GET /api/v1/resolutions/{id}/optical-layout (os-optics resolution layout / order layout)","CHOOSE_OPTICS_ONLY":"the design has no laboratory layout -- it is an optical system (design_intent OPTICAL_SYSTEM), or a source's light is not one beam (EXTENDED_EMITTER_NOT_RESOLVABLE, details.source_instance_ids): submit the same run again with customer_constraints.purchase_scope = OPTICS_ONLY (os-optics resolve RUN_DIR --optics-only); an optical system can also take OpenSci-derived mounts and no platform: include_breadboard = false and a mounting entry per optic (os-optics resolve RUN_DIR --mechanics derived --platform none --mounting FILE)","LIST_MECHANICAL_PRODUCTS":"a listed part number is not an orderable OpenSci product (details.line_ids): list the mechanical products (GET /api/v1/mechanical-products; os-optics products mechanical) and the ORDERABLE catalog optics (os-optics catalog list), correct those lines and submit again"},"status_by_family":{"UNAUTHENTICATED":401,"FORBIDDEN":403,"NOT_FOUND":404,"CONFLICT":409,"TOO_LARGE":413,"REJECTED":422,"RATE_LIMITED":429,"SERVER_ERROR":500},"other_statuses_by_family":{"NOT_FOUND":[405],"REJECTED":[400,415],"SERVER_ERROR":[503]},"status_rule":"the HTTP status is authoritative: each family answers its status_by_family status or one of its other_statuses_by_family (for example 405 METHOD_NOT_ALLOWED is family NOT_FOUND)","per_route":"the OpenAPI document lists every route's error codes with status and recovery (x-opensci-errors); a code whose recovery depends on the answer's details also lists every recovery it can carry, its default first (recoveries)","not_found_is_organization_safe":"another organization's resource answers exactly like a missing one"},"routes":[{"method":"GET","path":"/api/v1/account/token","scope":null,"idempotency_key":false,"does":"the presented token: organization, lifecycle, consumption, scopes, capabilities and optional expiry","helper":"client.token_status()"},{"method":"DELETE","path":"/api/v1/account/token","scope":null,"idempotency_key":false,"does":"revoke the presented token itself, immediately","helper":"client.revoke_current_token()"},{"method":"GET","path":"/api/v1/account/tokens","scope":"account:token:manage","idempotency_key":false,"does":"list your tokens (no secrets), newest first","helper":"os-optics account token list"},{"method":"POST","path":"/api/v1/account/tokens","scope":"account:token:manage","idempotency_key":true,"does":"issue a token for your Agent: {\"profile\": \"agent\"|\"review\"} or {\"scopes\": [...]}, \"lifecycle\" (SINGLE_USE, TIME_LIMITED or PERMANENT), \"lifetime_hours\", \"label\"; returns the secret credential once","helper":"os-optics account token create --profile agent --save"},{"method":"DELETE","path":"/api/v1/account/tokens/{token_id}","scope":"account:token:manage","idempotency_key":false,"does":"revoke one of your tokens, immediately","helper":"os-optics account token revoke TOKEN_ID"},{"method":"GET","path":"/api/v1/account/addresses","scope":"commercial:order:place","also_scope":"commercial:order:read","idempotency_key":false,"does":"list the organization's shipping addresses (mainland China), the default first; scope commercial:order:place or commercial:order:read","helper":"client.addresses() / os-optics account address list"},{"method":"POST","path":"/api/v1/account/addresses","scope":"commercial:order:place","idempotency_key":true,"does":"add a shipping address in mainland China; the first one becomes the default","helper":"client.add_address(...) / os-optics account address add --recipient ... --phone ... --province ... --city ... --district ... --street ...","body":{"recipient_name":"张三","mobile_phone":"13800138000","province":"广东省","city":"深圳市","district":"南山区","street_address":"科技园路 1 号 A 座 501","postal_code":"518000","label":"Lab","make_default":false}},{"method":"GET","path":"/api/v1/account/billing-titles","scope":"commercial:order:place","also_scope":"commercial:order:read","idempotency_key":false,"does":"list the organization's billing titles (the customer quotations and agreements name), the default first; scope commercial:order:place or commercial:order:read","helper":"raw HTTP (no client helper)"},{"method":"POST","path":"/api/v1/account/billing-titles","scope":"commercial:order:place","idempotency_key":true,"does":"add a billing title; the first one becomes the default","helper":"raw HTTP (no client helper)","body":{"kind":"ORGANIZATION","name":"上海光学仪器研究所","taxpayer_id":"91310000MA1FL0000X","address":"上海市浦东新区张江路 100 号","phone":"021-5080 0000","bank_name":"招商银行上海张江支行","bank_account":"1219 0000 0000 0001","make_default":false}},{"method":"PATCH","path":"/api/v1/account/billing-titles/{billing_title_id}","scope":"commercial:order:place","idempotency_key":false,"does":"change some fields of a billing title (null clears an optional detail); placed Orders keep their copy","helper":"raw HTTP (no client helper)","body":{"phone":"021-5080 0001","bank_name":null}},{"method":"DELETE","path":"/api/v1/account/billing-titles/{billing_title_id}","scope":"commercial:order:place","idempotency_key":false,"does":"delete a billing title (the newest remaining one becomes the default when it was the default); placed Orders keep their copy","helper":"raw HTTP (no client helper)"},{"method":"PUT","path":"/api/v1/account/billing-titles/{billing_title_id}/default","scope":"commercial:order:place","idempotency_key":false,"does":"make a billing title the default","helper":"raw HTTP (no client helper)"},{"method":"POST","path":"/api/v1/feedback","scope":null,"idempotency_key":true,"does":"send feedback to OpenSci: a problem met while serving your user, a missing capability or unclear instructions (any valid token); returns the feedback_id","helper":"client.submit_feedback(category=..., summary=..., details=...) / os-optics feedback submit --category PROBLEM --summary TEXT --details-file FILE","body":{"category":"DOCUMENTATION","summary":"how to print the order agreement is not described","details":"The user wanted a printed copy of the order agreement for their purchasing department. I found the agreement presentation, but no instructions say how to print it.","context":{"engine_version":"<os-optics --version>","locale":"en"}}},{"method":"POST","path":"/api/v1/commercial-submissions","scope":"commercial:resolve","idempotency_key":true,"does":"submit the Project and its Local Validation, with the purchase options; returns the resolution","helper":"client.submit(run, customer_constraints=...) / os-optics resolve RUN_DIR [--optics-only | --no-breadboard | --assembly-service] [--customer-supplied ID ...] [--require-all-retained-dofs]","body":{"schema":"opensci.commercial_submission","schema_version":"2.0","project_hash":"<project.content_hash()>","project":"<project.payload()>","local_validation":"<run.local_validation.payload()>","customer_constraints":{"purchase_scope":"COMPLETE_SYSTEM","include_breadboard":true,"assembly_service":false}}},{"method":"POST","path":"/api/v1/part-list-submissions","scope":"commercial:resolve","idempotency_key":true,"does":"submit a list of OpenSci part numbers (catalog optics, mechanical products, breadboards) with quantities, without a design; with mechanical_supply DERIVED OpenSci selects a mount, post and post holder for every listed optic at the beam height its mounting entry states; returns the resolution (basis PART_LIST)","helper":"client.submit_part_list(document) / os-optics resolve-parts PARTS.json [--mechanics none|derived]","body":{"schema":"opensci.commercial.part_list_submission","schema_version":"1","lines":[{"line_id":"L1","opensci_sku":"<an ORDERABLE OS-OPT-* product>","quantity":2},{"line_id":"B1","opensci_sku":"<an OS-MECH-* product of GET /mechanical-products>","quantity":1}],"mechanical_supply":"DERIVED","mounting":{"L1":{"beam_height_mm":125,"retained_dofs":[{"axis":"Rx","control":"MANUAL"},{"axis":"Ry","control":"MANUAL"}]}}}},{"method":"GET","path":"/api/v1/mechanical-products","scope":"commercial:resolve","idempotency_key":false,"does":"the OpenSci mechanical products a part list can name (mounts, posts, post holders, breadboards: names and the engineering facts every part OpenSci can supply it as now shares; ?kind=MOUNT|POST|POST_HOLDER|BREADBOARD); prices come with a resolution","helper":"client.mechanical_products(kind=...) / os-optics products mechanical [--kind KIND] [--json]"},{"method":"GET","path":"/api/v1/resolutions/{resolution_id}/mounting-sheet","scope":"commercial:resolve","idempotency_key":false,"does":"the mounting sheet of a resolution with OpenSci-derived mounts and no layout: per optic its mount, post and post holder, the assembly steps, the beam height arithmetic, the adjustment axes and the checks made (en and zh-CN text)","helper":"client.resolution_mounting_sheet(id) / os-optics resolution mounting-sheet ID [--locale en|zh-CN] [--out FILE]"},{"method":"GET","path":"/api/v1/resolutions/{resolution_id}","scope":"commercial:resolve","idempotency_key":false,"does":"read a resolution: Customer Purchase BOM, prices, assembly notes","helper":"client.resolution(id) / os-optics resolution show ID"},{"method":"GET","path":"/api/v1/resolutions/{resolution_id}/presentation","scope":"commercial:resolve","idempotency_key":false,"does":"the resolution presented in zh-CN or en (?locale=)","helper":"client.resolution_presentation(id, locale=...) / os-optics resolution show ID --locale zh-CN"},{"method":"GET","path":"/api/v1/resolutions/{resolution_id}/optical-layout","scope":"commercial:resolve","idempotency_key":false,"does":"the relative optical layout of a resolution (opensci.optical_layout.package): each component's relative position, orientation, product and outline, and the beam path with its spacing; the deliverable of an optics-only purchase","helper":"client.resolution_optical_layout(id) / os-optics resolution layout ID --out DIR"},{"method":"POST","path":"/api/v1/resolutions/{resolution_id}/assembly-preview-deliveries","scope":"commercial:assembly-preview:read","idempotency_key":false,"does":"obtain the Experimental Lab Assembly preview (protected delivery)","helper":"client.assembly_preview(id) / os-optics assembly preview ID"},{"method":"POST","path":"/api/v1/resolutions/{resolution_id}/assembly-detail-deliveries","scope":"commercial:assembly-detail:read","idempotency_key":false,"does":"obtain the Assembly Detail after OpenSci confirmed the payment (protected delivery)","helper":"client.assembly_detail(id, preview=...)"},{"method":"POST","path":"/api/v1/orders","scope":"commercial:order:place","idempotency_key":true,"does":"create the Order of a resolution: {\"resolution_id\": ..., \"shipping_address_id\": ... (optional: the default address), \"billing_title_id\": ... (optional: the default billing title, else the account name), \"additional_order\": true (only to buy a design your organization already ordered again on purpose)}; a single-use token is spent only on a new Order, and a retry with the same Idempotency-Key recovers that Order","helper":"client.create_order(id, shipping_address_id=..., additional_order=...) / os-optics order create ID [--address ID] [--additional-order]"},{"method":"GET","path":"/api/v1/orders","scope":"commercial:order:read","idempotency_key":false,"does":"list the organization's Orders","helper":"client.orders() / os-optics order list"},{"method":"GET","path":"/api/v1/orders/presentation","scope":"commercial:order:read","idempotency_key":false,"does":"the Order list in zh-CN or en (?locale=)","helper":null},{"method":"GET","path":"/api/v1/orders/{order_id}","scope":"commercial:order:read","idempotency_key":false,"does":"read an Order: quotation, agreement, bank-transfer instructions, payment state, next steps","helper":"client.order(id) / os-optics order show ID"},{"method":"GET","path":"/api/v1/orders/{order_id}/presentation","scope":"commercial:order:read","idempotency_key":false,"does":"an Order in zh-CN or en (?locale=)","helper":"client.order_presentation(id, locale=...)"},{"method":"GET","path":"/api/v1/orders/{order_id}/quotation/presentation","scope":"commercial:order:read","idempotency_key":false,"does":"the Order's quotation in zh-CN or en (?locale=)","helper":null},{"method":"GET","path":"/api/v1/orders/{order_id}/contract/presentation","scope":"commercial:order:read","idempotency_key":false,"does":"the Order's agreement in zh-CN or en (?locale=)","helper":null},{"method":"GET","path":"/api/v1/orders/{order_id}/optical-layout","scope":"commercial:order:read","idempotency_key":false,"does":"the Order's optical layout, bound to its Order Number: the deliverable of an optics-only Order","helper":"client.order_optical_layout(id) / os-optics order layout ORDER_ID --out DIR"},{"method":"GET","path":"/api/v1/orders/{order_id}/mounting-sheet","scope":"commercial:order:read","idempotency_key":false,"does":"the Order's mounting sheet, naming its Order Number: the deliverable of an Order with OpenSci-derived mounts and no layout","helper":"client.order_mounting_sheet(id) / os-optics order mounting-sheet ORDER_ID [--locale en|zh-CN] [--out FILE]"},{"method":"POST","path":"/api/v1/orders/{order_id}/bank-transfer-reports","scope":"commercial:payment:report","idempotency_key":true,"does":"report the bank transfer (when the person who paid says it was made)","helper":"client.report_bank_transfer(id) / os-optics order report-transfer ID"},{"method":"POST","path":"/api/v1/orders/{order_id}/withdrawal","scope":"commercial:order:place","idempotency_key":false,"does":"withdraw an unpaid Order without a reported transfer; the Order and its data are deleted (404 ORDER_NOT_FOUND once it is gone)","helper":"client.withdraw_order(id) / os-optics order withdraw ID"},{"method":"POST","path":"/api/v1/artifact-sets","scope":"commercial:assembly-artifact:write","idempotency_key":true,"does":"upload an assembly validation result or a Detailed Assembly Drawing (multipart/form-data: one 'manifest' part and one 'file' part per manifest file, named by the manifest filename); uploads per Account member and per organization are limited per hour (429 ARTIFACT_UPLOAD_RATE_LIMITED), and pause after several uploads were refused for their content (429 ARTIFACT_UPLOAD_SUSPENDED); both carry Retry-After","helper":"client.upload_assembly_results(id, validation=..., drawing=...)"},{"method":"GET","path":"/api/v1/artifact-sets/{artifact_set_id}","scope":"commercial:assembly-artifact:read","idempotency_key":false,"does":"read one artifact set","helper":"client.artifact_set(id)"},{"method":"GET","path":"/api/v1/artifact-sets/{artifact_set_id}/files/{role}","scope":"commercial:assembly-artifact:read","idempotency_key":false,"does":"download one artifact file by role","helper":"client.artifact_file(id, role) / os-optics artifacts download SET_ID ROLE --out FILE"},{"method":"GET","path":"/api/v1/resolutions/{resolution_id}/artifact-sets","scope":"commercial:assembly-artifact:read","idempotency_key":false,"does":"list a resolution's artifact sets (?artifact_kind= optional)","helper":"client.artifact_sets(id) / os-optics artifacts list ID"},{"method":"GET","path":"/api/v1/health","scope":"public","idempotency_key":false,"does":"service and database reachability","helper":null},{"method":"GET","path":"/api/v1/catalog","scope":"public","idempotency_key":false,"does":"the public catalog releases this service serves: current and retained (ETag; If-None-Match -> 304)","helper":"os-optics catalog status / sync"},{"method":"GET","path":"/api/v1/catalog/releases/{catalog_version}","scope":"public","idempotency_key":false,"does":"one public catalog release document, byte for byte (immutable; gzip when accepted)","helper":"os-optics catalog sync"}]}