Voor ontwikkelaars
Open source, op GitHub.
Open Brand Exchange is een specificatie met drie API's, JSON Schema's, testdata en een conformancetest. De specificatie is de bron; de implementaties volgen haar.
$ curl https://brands.maison-noor.example/.well-known/obx{
"obx_version": "0.3",
"spec_version": "0.3.1",
"publisher": { "name": "MAISON NOOR Group" },
"api_base": "https://brands.maison-noor.example/obx/v1",
"portal_url": "https://brands.maison-noor.example/",
"capabilities": ["changes", "products", "by_gtin",
"renditions", "exports", "webhooks"]
}De specificatie
Versie 0.3. OpenAPI 3.1, JSON Schema 2020-12, voorbeelden en een fictief testmerk, MAISON NOOR. Licentie CC-BY-4.0: vrij te implementeren, ook commercieel.
openbrandexchange/spec · Begin bij protocol.md ·Snel aan de slag: OBX in 10 minuten
Nieuw in versie 0.3
- Materialen en wasvoorschriften zijn codes met namen in het Engels, Nederlands, Duits en Frans, uit gedeelde vocabulaires op /vocabularies/v0.3/.
- Meerdere duurzaamheidsclaims per vezel: gerecycled, biologisch, in omschakeling, pre-consumer, post-consumer en regeneratief. In een bestand bijvoorbeeld: 100% polyester (recycled) (post_consumer).
- Stabiele variant-id's: standaard het stijlnummer, de kleur en de maat, nooit de EAN. Een EAN kan dus later komen of wijzigen zonder dat er een nieuwe variant ontstaat.
- Extensies: je eigen x-<vendor>-<name>-velden worden opgeslagen en teruggegeven, en een onbekend veld laat een schrijfactie nooit mislukken.
- Nieuwe codes: de fout idempotency_key_reused en de waarschuwingen material_unknown en qualifier_deprecated. Elke code heeft een eigen pagina onder /errors/.
- Vanaf 0.3 veranderen bestaande structuren onder /obx/v1 alleen nog door toevoegingen. Gepland voor 0.4: wonen en sport, zoeken en filters, en betere webhooks.
Repository's
Alles is open source op GitHub: de specificatie, de gedeelde code en de drie portaaledities.
- openbrandexchange/specDe specificatie, schema's en testdata
- openbrandexchange/obx-goGo-SDK, de obx-tool en de conformancetest
- openbrandexchange/node-tsPortaal voor Cloudflare Workers
- openbrandexchange/node-goPortaal voor je eigen server
- openbrandexchange/node-phpPortaal voor gewone webhosting
- openbrandexchange/admin-uiDe webinterface van elk portaal
Drie API's
| API | Voor | Status | Contract |
|---|---|---|---|
| OBX Protocol | software van retailers: discovery, OAuth2 client credentials, wijzigingsfeed, opzoeken op GTIN, renditions, exports, webhooks | normatief | obx-protocol.yaml · HTML |
| OBX Ingest API | de automatisering van een merk: idempotente upserts op de eigen id's van het merk, uploads op sha256, batches, imports | normatief | obx-ingest.yaml · HTML |
| Node Admin + Portal API | de gedeelde beheeromgeving en het retailerportaal | niet-normatief | node-admin.yaml · HTML |
Probeer het op het demoportaal
Het demoportaal heeft een openbare testsleutel die alleen kan lezen. De catalogus is fictief en wordt elk uur teruggezet, dus de quickstart werkt meteen.
- Openbare testsleutel (alleen lezen)
obxc_demo-portal-read-only·obxs_demo-portal-read-only-public
HOST=https://obx-portal-demo.richardlindhout96.workers.dev
CLIENT_ID=obxc_demo-portal-read-only
CLIENT_SECRET=obxs_demo-portal-read-only-public
TOKEN=$(curl -s -u "$CLIENT_ID:$CLIENT_SECRET" -d grant_type=client_credentials \
$HOST/obx/v1/oauth/token | jq -r .access_token)
curl -s -H "Authorization: Bearer $TOKEN" "$HOST/obx/v1/changes?limit=500" | jq '{phase, has_more, n: (.changes | length)}'
curl -s -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{"gtins": ["2000100801017", "2000100101025"]}' "$HOST/obx/v1/products:by-gtin"Een merkportaal uitlezen in een paar regels
HOST=https://brands.maison-noor.example
curl -s $HOST/.well-known/obx # what does this brand offer?
TOKEN=$(curl -s -u "$CLIENT_ID:$CLIENT_SECRET" -d grant_type=client_credentials \
$HOST/obx/v1/oauth/token | jq -r .access_token)
curl -s -H "Authorization: Bearer $TOKEN" "$HOST/obx/v1/changes?limit=500" # everything, then only changes
curl -s -H "Authorization: Bearer $TOKEN" -X POST -H 'Content-Type: application/json' \
-d '{"gtins":["2000100101025"]}' "$HOST/obx/v1/products:by-gtin"
# or let the obx tool keep a copy in a folder, only fetching what changed:
OBX_CLIENT_ID=$CLIENT_ID OBX_CLIENT_SECRET=$CLIENT_SECRET obx pull $HOST --out ./maison-noorSDK en commandline-tool
Conformance
Een implementatie is OBX-conformant voor een profiel als obx-conformance alle verplichte tests van dat profiel haalt. Er zijn vier profielen: protocol, ingest, portal en security. conformance.md
obx-conformance all --url http://localhost:8080 --setup-code … # a fresh portal: setup, fixtures, every profile
obx-conformance protocol --url https://brands.maison-noor.example --client-id obxc_… --client-secret obxs_…
obx-conformance mock # a mock server that passes everythingEerst snel kijken? De online compatibiliteitscheck test een portal van buitenaf, alleen lezend. Online compatibiliteitscheck
Bouw het met je AI-assistent
Kopieer een prompt naar Claude, ChatGPT of Cursor, vul het deel tussen haken in en laat de assistent code schrijven volgens de specificatie.
You are helping me connect our system to Open Brand Exchange (OBX), the open standard for how brands share product photos and article data with retailers.
Read these first:
- Import format: https://github.com/openbrandexchange/spec/blob/main/docs/import-format.md
- Example data (fictional brand MAISON NOOR): https://github.com/openbrandexchange/spec/blob/main/fixtures/maison-noor/products.csv
- JSON Schemas: https://openbrandexchange.com/schemas/v0.3/
- Codes with their names (materials, qualifiers, care): https://openbrandexchange.com/vocabularies/v0.3/
Our system: [name, version, database or API, programming language].
Task:
1. Write an export that produces products.csv exactly in the OBX import format: the same columns in the same order as the MAISON NOOR example, one row per size, UTF-8.
2. Map our fields to the OBX columns. Include the fibre composition per part, the care codes and the EANs. List every OBX field we cannot fill, and every field of ours that has no place in OBX.
3. Rename or copy our product photos to the OBX naming rule {style}_{color}_{position}.jpg, for example MN-1001_NVY_1.jpg.
4. Add a test that runs the export on sample data and compares the result with the MAISON NOOR example's columns.
5. Explain how to check the result with: obx push --dry-run
Ask me for anything you need to know about our system before you write code.You are helping me read Open Brand Exchange (OBX) in our software. OBX is the open standard for how brands share product photos and article data with retailers; every brand runs its own portal with the same API.
Read these first:
- OBX in 10 minutes: https://github.com/openbrandexchange/spec/blob/main/docs/quickstart.md
- Protocol: https://github.com/openbrandexchange/spec/blob/main/docs/protocol.md
- OpenAPI contract: https://github.com/openbrandexchange/spec/blob/main/openapi/obx-protocol.yaml
Our software: [name, programming language, where products and images are stored].
Task:
1. Discover a brand portal through /.well-known/obx and get a token with OAuth2 client credentials.
2. Read the change feed: a full snapshot first, then only the changes, including deletions. Store the cursor so a restart continues where it stopped.
3. Map OBX products, variants (by EAN) and assets to our data model, including fibre composition, care and measurements.
4. Download the image renditions we need, and keep the usage rights and embargo dates with each image.
5. Handle errors and rate limits as the protocol describes, and add tests against the mock portal: obx-conformance mock.
Ask me for anything you need to know about our software before you write code.Implementaties
| Repository | Wat | Licentie | Status |
|---|---|---|---|
| spec | specificatie, schema's, testdata | CC-BY-4.0 | 0.3 |
| obx-go | Go-SDK, obx-tool, conformancetest, mockserver | Apache-2.0 | 0.3 |
| admin-ui | gedeelde webinterface: beheer en retailerportaal | Apache-2.0 | 0.3 |
| node-go | Portaal voor je eigen server Go: je eigen server, met een installer van één regel | AGPL-3.0 | 0.3 |
| node-php | Portaal voor webhosting PHP: gewone webhosting | AGPL-3.0 | 0.3 |
| node-ts | Portaal voor Cloudflare TypeScript: Cloudflare Workers | AGPL-3.0 | 0.3 |
Bouw je zelf een implementatie of een afnemer? Laat het weten met een issue of pull request; hij komt in deze tabel zodra hij de conformancetest haalt.
Documenten
protocol.mdhet protocol, in gewone tekstingest.mdpubliceren via de Ingest APIimport-format.mdhet CSV-formaat en de bestandsnamenautomation.mdautomatiseringsreceptensecurity.mdbeveiligingseisenversioning.mdversies en compatibiliteitdirectory.mdmerkenlijsten
Bijdragen gaan via pull requests op de spec-repository. Hoe beslissingen worden genomen.
Doe mee
De standaard ontstaat in het openbaar en iedereen kan meedoen. Je hoeft niet te programmeren. Werk je bij een merk of retailer? Vertel ons waar je tegenaan loopt, wat er ontbreekt en wat goed werkt.
Discussies
Stel een vraag, deel een idee of reageer op een voorstel voor de volgende versie. Hier begin je het best.
Issues en pull requests
Voor een concrete wijziging: een fout in de specificatie, een ontbrekend veld, een beter voorbeeld. Open een issue, of stel de wijziging zelf voor in een pull request.
E-mail
Voor een vraag die je liever niet openbaar stelt.
Blijf op de hoogte
Volg de spec-repository op GitHub (Watch → Custom → Releases), dan hoor je het bij elke nieuwe versie.