Do fhorbróirí
Foinse oscailte, ar GitHub.
Is sonraíocht é Open Brand Exchange le trí API, JSON Schemas, sonraí tástála agus tástálacha comhréireachta. Is í an tsonraíocht an fhoinse fírinne; leanann na cur chun feidhme í.
$ 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"]
}An tsonraíocht
Leagan 0.3. OpenAPI 3.1, JSON Schema 2020-12, samplaí agus branda tástála bréige, MAISON NOOR. Ceadúnas CC-BY-4.0: saor le cur chun feidhme, go tráchtála freisin.
openbrandexchange/spec · Tosaigh le protocol.md ·Tús tapa: OBX i 10 nóiméad
Nua i leagan 0.3
- Is cóid iad ábhair agus cúram, le hainmneacha i mBéarla, in Ollainnis, i nGearmáinis agus i bhFraincis, ó fhoclóirí comhroinnte atá foilsithe ag /vocabularies/v0.3/.
- Roinnt éileamh inbhuanaitheachta in aghaidh an tsnáithín: athchúrsáilte, orgánach, faoi thiontú, réamhthomhaltóra, iarthomhaltóra agus athghiniúnach. I gcomhad, mar shampla: 100% polyester (recycled) (post_consumer).
- Aitheantais chobhsaí do mhalairtí: de réir réamhshocraithe, uimhir an stíle, an dath agus an méid, ach ní an EAN riamh. Mar sin is féidir le EAN teacht nó athrú níos déanaí gan malairt nua a chruthú.
- Síntí: stóráiltear agus seoltar ar ais do réimsí féin x-<vendor>-<name>, agus ní theipeann ar scríobh riamh mar gheall ar réimse anaithnid.
- Cóid nua: an earráid idempotency_key_reused agus na rabhaidh material_unknown agus qualifier_deprecated. Tá a leathanach féin faoi /errors/ ag gach cód.
- Ó 0.3 ar aghaidh, ní athraítear na cruthanna atá ann faoi /obx/v1 ach trí rudaí a chur leo. Beartaithe do 0.4: baile agus spórt, cuardach agus scagairí, agus webhooks níos fearr.
Liosta iomlán na n-athruithe · /vocabularies/v0.3/ ·/errors/
Stórtha
Tá gach rud ina fhoinse oscailte ar GitHub: an tsonraíocht, an cód comhroinnte agus na trí eagrán den tairseach.
- openbrandexchange/specAn tsonraíocht, na scéimeanna agus na sonraí tástála
- openbrandexchange/obx-goGo SDK, an uirlis obx agus an tástáil chomhréireachta
- openbrandexchange/node-tsTairseach do Cloudflare Workers
- openbrandexchange/node-goTairseach do d'fhreastalaí féin
- openbrandexchange/node-phpTairseach d'óstáil ghréasáin ghnáth
- openbrandexchange/admin-uiComhéadan gréasáin gach tairsí
Trí API
| API | Do | Stádas | Conradh |
|---|---|---|---|
| OBX Protocol | bogearraí miondíoltóirí: discovery, OAuth2 client credentials, fotha athruithe, cuardach GTIN, renditions, easpórtálacha, webhooks | normatach | obx-protocol.yaml · HTML |
| OBX Ingest API | uathoibriú branda: upserts idempotent de réir aitheantóirí an bhranda féin, uaslódálacha seolta le sha256, baisceanna, allmhairí | normatach | obx-ingest.yaml · HTML |
| Node Admin + Portal API | an riarachán comhroinnte agus an tairseach miondíoltóirí | neamhnormatach | node-admin.yaml · HTML |
Bain triail as ar an tairseach taispeántais
Tá eochair tástála phoiblí ag an tairseach taispeántais nach féidir léi ach léamh. Is catalóg bréige í agus athshocraítear í gach uair an chloig, mar sin oibríonn an treoir thapa láithreach.
- Eochair tástála phoiblí (léamh amháin)
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"Tairseach branda a léamh i gcúpla líne
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 agus uirlis líne ordaithe
Comhréireacht
Tá cur chun feidhme comhréireach le OBX do phróifíl nuair a éiríonn le obx-conformance i ngach tástáil éigeantach den phróifíl sin. Tá ceithre phróifíl ann: protocol, ingest, portal agus 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 everythingAr mhaith leat léargas tapa ar dtús? Tástálann an tseiceáil chomhoiriúnachta ar líne tairseach ón taobh amuigh, le léamh amháin. Seiceáil chomhoiriúnachta ar líne
Tóg é le do chúntóir AI
Cóipeáil leid isteach in Claude, ChatGPT nó Cursor, comhlánaigh an chuid idir lúibíní, agus lig don chúntóir cód a scríobh de réir na sonraíochta.
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.Cur chun feidhme
| Stór | Cad | Ceadúnas | Stádas |
|---|---|---|---|
| spec | sonraíocht, scéimeanna, sonraí tástála | CC-BY-4.0 | 0.3 |
| obx-go | Go SDK, uirlis obx, tástálacha comhréireachta, freastalaí bréige | Apache-2.0 | 0.3 |
| admin-ui | comhéadan gréasáin comhroinnte: riarachán agus tairseach miondíoltóirí | Apache-2.0 | 0.3 |
| node-go | Tairseach do d'fhreastalaí féin Go: do fhreastalaí féin, le suiteálaí aon líne | AGPL-3.0 | 0.3 |
| node-php | Tairseach d'óstáil gréasáin PHP: gnáth-óstáil ghréasáin | AGPL-3.0 | 0.3 |
| node-ts | Tairseach do Cloudflare TypeScript: Cloudflare Workers | AGPL-3.0 | 0.3 |
Ag tógáil do chur chun feidhme nó do chliant féin? Cuir in iúl dúinn le issue nó pull request, agus rachaidh sé sa tábla seo a luaithe a éiríonn leis sna tástálacha comhréireachta.
Doiciméid
protocol.mdan prótacal, i bprósingest.mdfoilsiú tríd an Ingest APIimport-format.mdan fhormáid CSV agus ainmneacha comhadautomation.mdoidis uathoibrithesecurity.mdriachtanais slándálaversioning.mdleaganacha agus comhoiriúnachtdirectory.mdeolairí brandaí
Déantar ranníocaíochtaí trí pull requests ar an stór spec. Conas a dhéantar cinntí.
Glac páirt
Déantar an caighdeán a mhúnlú go poiblí, agus is féidir le duine ar bith páirt a ghlacadh. Ní gá duit cód a scríobh: má oibríonn tú do bhranda nó do mhiondíoltóir, inis dúinn faoi na fadhbanna a bhíonn agat, cad atá in easnamh agus cad a oibríonn.
Plé
Cuir ceist, roinn smaoineamh nó déan trácht ar mholadh don chéad leagan eile. An áit is fearr le tosú.
Issues agus pull requests
Le haghaidh athrú áirithe: botún sa tsonraíocht, réimse atá in easnamh, sampla níos fearr. Oscail issue, nó mol an t-athrú tú féin i pull request.
Ríomhphost
Le haghaidh ceiste nárbh fhearr leat a chur go poiblí.
Coinnigh suas chun dáta
Lean an stór spec ar GitHub (Watch → Custom → Releases) agus cloisfidh tú faoi gach leagan nua.