OI Payments Docs
API ReferenceProducts

Update

PATCH
/api/v1/products/{id}

Authorization

AppApiKey AppApiSecret
X-Api-Key<token>

Per-app API key. Sent together with the X-Api-Secret header. The key's mode (TEST or LIVE) selects the data partition — it is never taken from the request body.

In: header

X-Api-Secret<token>

Per-app API secret that pairs with X-Api-Key. Both headers are required on every app-facing call.

In: header

Path Parameters

id*integer

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

*/*

curl -X PATCH "https://example.com/api/v1/products/0" \  -H "Content-Type: application/json" \  -d '{}'
{
  "data": {
    "id": 0,
    "name": "string",
    "description": "string",
    "status": "DRAFT",
    "mode": "TEST",
    "prices": [
      {
        "id": 0,
        "productId": 0,
        "type": "ONE_TIME",
        "amountMinor": 0,
        "currency": "string",
        "interval": "DAY",
        "intervalCount": 0,
        "trialDays": 0,
        "active": true,
        "createdAt": "2019-08-24T14:15:22Z"
      }
    ],
    "benefits": [
      {
        "id": 0,
        "lookupKey": "string",
        "name": "string",
        "metadata": "string",
        "active": true,
        "mode": "TEST",
        "createdAt": "2019-08-24T14:15:22Z",
        "updatedAt": "2019-08-24T14:15:22Z"
      }
    ],
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  },
  "meta": {
    "success": true,
    "message": "string",
    "errorCode": "RESOURCE_NOT_FOUND",
    "timestamp": "2019-08-24T14:15:22Z"
  },
  "pagination": {
    "page": 0,
    "size": 0,
    "totalElements": 0,
    "totalPages": 0
  }
}