Documentation & page contents

REST · public

Garment records

Every page in the garment library is rendered from one imported research record. The same record is served as JSON and Markdown, without authentication, so an application or an agent reads exactly what the page shows, with sources attached.

Read-only and cached for an hour. The record is a research snapshot: absence of an asset is not proof it does not exist, and no value is a production guarantee. The SDK and hosted MCP remain gated.

Endpoints

Served from the Algorithmic Labs platform API at https://api.beforewear.com.

GET /garments/                          published records (index cards)
GET /garments/<slug>/                   identity, thumbnail, links to both projections
GET /garments/<slug>/beforewear.json    technical projection
GET /garments/<slug>/beforewear.md      the record page as cited Markdown
GET /garments/<slug>/vaybel.json        seller projection (pricing, reviews, decisions)
GET /garments/schema.json               JSON Schema 2020-12 for the payload

Slugs are the page paths: bella-canvas-3001, gildan-18500, printify-bp450-aop-hood. Filter the index with ?unit=branded_blank|printful_native|printify_native, ?category=hoodie or ?q=gildan.

curl -s https://api.beforewear.com/garments/bella-canvas-3001/beforewear.json \
  | jq '.data.measurements[] | select(.size_label=="M") | {dataset_id, measurement_name, value, unit}'

Payload shape

schema_version is garment-access/2.4.0. The technical projection carries these data sections: identity, material_profiles, colors, size_ranges, variants, measurements, construction, performance_tests, certifications, supply_chain, assets, asset_relationships, manufacturing, capabilities, additional_facts. Commerce sections (offers, price components, shipping, reviews, decisions) live only in the seller projection.

Rows have stable ids (mat-001, color-014, place-py-bp12-pp29-front) and reference each other by id: a color names its material_profile_id, a placement names its provider_listing_id and method_id, a capability lists asset_ids. Every declared column is present; unknown values are null, and an empty array means nothing was captured.

Measurements are long-form: one row per size, name, dataset and unit, with measurement_kind (finished_garment, body, pattern), method and landmarksas the source states them. Placement geometry is in the provider's unit: pixels for print-file canvases, inches for physical print areas. Nothing is converted silently; conversions appear as calculation claims.

Both projections share a selection_summary: garment-only suitability and tradeoffs, each linked to claim IDs. Use this to compare blanks by fit, material and garment evidence; evaluate printing, pricing and fulfillment separately. Catalog Product is the canonical identity; research is its read-only attachment.

Claims and pointers

claims support every populated fact. targets are JSON Pointers into data (for example /data/material_profiles/mat-001/weight_gsm), references name sources entries with a locator, and verification says whether the source was checked, independently corroborated or left as a single report. conflicts keep disagreeing observations visible; an unresolved conflict leaves the canonical value null. gaps say what was not found, why, who can close it and how urgent it is.

{
  "id": "C0005",
  "targets": ["/data/material_profiles/mat-001/fiber_names",
              "/data/material_profiles/mat-001/fiber_percentages"],
  "kind": "source_claim",
  "verification": "independently_corroborated",
  "references": [
    {"source_id": "S010", "locator": "spec block: fabric"},
    {"source_id": "S003", "locator": "variants[].material"}
  ]
}

Assets and rights

assets lists files the research located publicly: provider imagery, published templates, size charts. Each row carries origin, format, validation and license fields. capabilities record what a provider or maker documents the garment can do, with license_cleared and production_integration_verified kept separate from supported.

Source files, display rights, SDK redistribution, simulation suitability, manufacturing rights and live integration support are different checks. Licensed internal assets are never part of the public projection; they attach when a garment is mapped into the factory under an agreement.

Into the factory

A mapped garment becomes a Product the Python Client can drape, color and stamp with artwork; the same operations exist as MCP tools. Artwork decoration creates a decorated-product Run; construction changes create a derived garment with retained lineage. Request access to map a garment from this library.

from beforewear import Client

bw = Client()
blank = bw.products.get("vb-ts-bc3001")           # mapped from garment:bella-canvas:3001
body = bw.bodies.select(sex="male", size="M", pose="native_straight")
run = bw.projects.create(product=blank.id, body=body.id,
                         material=bw.materials.get("jersey_142gsm").id).drape()