01.software Docs

refreshCustomerSession

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

All HTTP operations
POST
/api/customers/refresh

Direct opaque refresh body rotates its single-use legacy-direct family and returns token+refreshToken. Without a truthy parsed string refreshToken, empty/malformed/absent/non-object bodies fall back to the existing active Customer bearer path returning token only. Do not conflate hosted client-bound refresh or turn malformed input into a new required-body rejection.

Authorization

headerX-Publishable-Key<token>

Tenant publishable key for authentication (sent via X-Publishable-Key header)

Request Body

body?unknownapplication/json

Any parsed JSON value is tolerated by parseOptionalRefreshBody; only a truthy string refreshToken selects direct family rotation. Empty/malformed/non-JSON input falls back to bearer compatibility, which still requires its active bearer credential.

Response Body

Existing direct customer-auth wire

application/json
  1. response
token*string
refreshToken*string

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/customers/refresh'
Example Response
{  "token": "string",  "refreshToken": "string"}

Credential variants

Credential-specific requirements from the public OpenAPI projection: Full response schemas appear in Response Body.

[
  {
    "security": [
      {
        "publishableKey": []
      }
    ],
    "requestSchema": {
      "type": "object",
      "required": [
        "refreshToken"
      ],
      "properties": {
        "refreshToken": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "responseSchema": "See Response Body"
  },
  {
    "security": [
      {
        "publishableKey": [],
        "customerBearerAuth": []
      }
    ],
    "description": "No truthy refresh token parsed; active bearer compatibility.",
    "responseSchema": "See Response Body"
  }
]