Owostack

Sync catalog from code

Reconciles features, credit systems, credit packs, and plans from an SDK-defined catalog into the database.

POST
/v1/sync

Authorization

bearerAuth

Request Body

application/json

defaultProvider?string
features*array<>
creditSystems?array<>
creditPacks?array<>
plans*array<>

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.owostack.com/v1/sync" \  -H "Content-Type: application/json" \  -d '{    "features": [      {        "slug": "string",        "type": "metered",        "name": "string"      }    ],    "plans": [      {        "slug": "string",        "name": "string",        "price": 0,        "currency": "string",        "interval": "string",        "features": [          {            "slug": "string",            "enabled": true          }        ]      }    ]  }'
{
  "success": true,
  "features": {
    "created": [
      "string"
    ],
    "updated": [
      "string"
    ],
    "unchanged": [
      "string"
    ]
  },
  "creditSystems": {
    "created": [
      "string"
    ],
    "updated": [
      "string"
    ],
    "unchanged": [
      "string"
    ]
  },
  "creditPacks": {
    "created": [
      "string"
    ],
    "updated": [
      "string"
    ],
    "unchanged": [
      "string"
    ]
  },
  "plans": {
    "created": [
      "string"
    ],
    "updated": [
      "string"
    ],
    "unchanged": [
      "string"
    ]
  },
  "warnings": [
    "string"
  ],
  "property1": null,
  "property2": null
}
{
  "success": true,
  "error": "string",
  "code": "string",
  "message": "string",
  "property1": null,
  "property2": null
}
{
  "success": true,
  "error": "string",
  "code": "string",
  "message": "string",
  "property1": null,
  "property2": null
}
{
  "success": true,
  "error": "string",
  "code": "string",
  "message": "string",
  "property1": null,
  "property2": null
}

AI Chat

Owostack docs assistant

Start a new chat below.