01.software Docs

upsertProduct

Use the SDK for application integration. This read-only reference covers Commerce, Customer Auth, Membership and Events.

All HTTP operations
POST
/api/products/upsert

Tenant-editor policy with write scope. Returns the actual server Product document and projection sync staleness, never a browser catalog DTO.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Public integration credentials: verified opaque sk01_ secret key or pat01_ personal access token; operation policy and read/write scopes still apply. These credentials are not Customer JWTs.

Request Body

application/json
  1. body
graphRevision?string
productId?string|number
product?
options?array<>
Itemsitems <= 10
variants?array<>
Itemsitems <= 500

Response Body

Actual shaped success body

application/json
  1. response
ok*true
Value intrue
product*

Actual authenticated Payload Product document. Relationship depth and field access vary. This is server-only legacy wire, not the canonical public DTO or a browser discovery promise.

productProjectionStale*boolean

Examples may be generated from schemas; they are illustrative, not recorded successful API calls. Example snippets may omit required authentication headers.

Example Request
curl -X POST 'https://api.01.software/api/products/upsert' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "ok": true,  "product": {    "id": "string",    "createdAt": "string",    "updatedAt": "string",    "slug": "string",    "title": "string",    "status": "string",    "variants": {      "docs": [        "string"      ]    }  },  "productProjectionStale": true}