{"openapi":"3.1.0","info":{"title":"PXM Integration Platform API","version":"0.1.0","description":"Product information (PIM) + product experience (PXM) API. Auth: `Authorization: Bearer <api key>`. Errors use RFC 9457 problem details."},"servers":[{"url":"/"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer"}},"schemas":{"Problem":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}}},"Values":{"type":"object","additionalProperties":true,"description":"property id -> value; localized text is {\"es-CR\": \"...\", \"en-US\": \"...\"}"}}},"security":[{"apiKey":[]}],"paths":{"/api/v1/products":{"get":{"summary":"List products (cursor pagination)","parameters":[{"name":"limit","in":"query","schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"category","in":"query","schema":{"type":"string"}},{"name":"state","in":"query","schema":{"type":"string"}},{"name":"q","in":"query","schema":{"type":"string"}},{"name":"locale","in":"query","schema":{"type":"string"}},{"name":"updated_since","in":"query","schema":{"type":"string"}},{"name":"parents_only","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of products; `Link: rel=\"next\"` when more exist"}}},"post":{"summary":"Create a product","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Retries with the same key and body return the first response"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["sku"],"properties":{"sku":{"type":"string"},"parentId":{"type":"string"},"values":{"$ref":"#/components/schemas/Values"}}}}}},"responses":{"201":{"description":"Created"},"409":{"description":"SKU exists","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/products/{id}":{"get":{"summary":"Get a product (ETag / If-None-Match)","parameters":[{"name":"id","in":"path","required":true,"description":"Product id (prd_…) or SKU","schema":{"type":"string"}}],"responses":{"200":{"description":"Product with resolved values and channel readiness"},"304":{"description":"Not modified"},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"summary":"Partial update (If-Match for optimistic concurrency)","parameters":[{"name":"id","in":"path","required":true,"description":"Product id (prd_…) or SKU","schema":{"type":"string"}},{"name":"If-Match","in":"header","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Values"}}}},"responses":{"200":{"description":"Updated"},"412":{"description":"Version changed since you read it","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"summary":"Delete a product without variants","parameters":[{"name":"id","in":"path","required":true,"description":"Product id (prd_…) or SKU","schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"}}}},"/api/v1/products/{id}/variants":{"get":{"summary":"Variants of a family","parameters":[{"name":"id","in":"path","required":true,"description":"Product id (prd_…) or SKU","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/v1/products/{id}/readiness":{"get":{"summary":"Readiness per channel","parameters":[{"name":"id","in":"path","required":true,"description":"Product id (prd_…) or SKU","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/v1/products/{id}/history":{"get":{"summary":"Audit trail","parameters":[{"name":"id","in":"path","required":true,"description":"Product id (prd_…) or SKU","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/v1/products/{id}/transitions":{"post":{"summary":"Move a product through the workflow","parameters":[{"name":"id","in":"path","required":true,"description":"Product id (prd_…) or SKU","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string"},"comment":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"},"403":{"description":"Role not allowed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Invalid transition","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Guard failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/formulas/evaluate":{"post":{"summary":"Evaluate a formula against a product","responses":{"200":{"description":"OK"},"422":{"description":"Formula error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/channels/{id}/feed":{"get":{"summary":"Channel feed (json | csv | xml)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","schema":{"enum":["json","csv","xml"]}}],"responses":{"200":{"description":"OK"}}}},"/api/v1/imports/erp":{"post":{"summary":"Import SAP-style material master XML (idempotent)","requestBody":{"content":{"application/xml":{"schema":{"type":"string"}}}},"responses":{"200":{"description":"Import report"},"415":{"description":"Not XML","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/webhooks/subscriptions":{"get":{"summary":"List subscriptions"},"post":{"summary":"Subscribe a URL to events (secret returned once)"}},"/api/v1/webhooks/deliveries":{"get":{"summary":"Delivery log (pending / succeeded / dead)"}},"/api/v1/webhooks/deliveries/{id}/replay":{"post":{"summary":"Replay a dead delivery"}},"/api/v1/webhooks/inbound/dam":{"post":{"summary":"DAM asset webhook (HMAC-signed, replay-protected)","security":[]}},"/api/v1/ai/suggestions":{"post":{"summary":"Generate AI copy suggestion (validated, needs human approval)"},"get":{"summary":"List suggestions"}},"/api/v1/ai/suggestions/{id}/decision":{"post":{"summary":"Approve or reject a suggestion"}},"/graphql":{"post":{"summary":"GraphQL endpoint (same data and rules as REST)"}}}}