Ir al contenido
UnoPagoDocumentación

Get a plan by id

GET
/v1/plans/{planId}

Autorización

bearerAuth
headerAutorizaciónBearer <token>

Your API key, created in Configuración → Claves API. The key alone, without the Bearer prefix, is accepted too.

Parámetros de ruta

planId*string
Patrón^[cC][0-9a-z]{6,}$
Formatocuid

Cuerpo de la respuesta

Successful response

application/json
  1. response
schedule*string
Valor en"SUBSCRIPTION_START""PLAN_DATES"
billingCycle*|null
currency*string
Valor en"VES""USD""EUR"
pricingMode*string
Valor en"CURRENCY""REFERENCE"
status*string
Valor en"ACTIVE""INACTIVE"
lateFeeType*|null
discountValueType*|null
id*string
Patrón^[cC][0-9a-z]{6,}$
Formatocuid
accountId*string
name*string
description*string|null
price*number
advanceBillingDays*|null
advanceDueDateDays*|null
startDate*string
endDate*string|null
lateFee*number|null
discountValue*number|null
discountExpiresIn*|null
singleInvoicePerSubscription*boolean
createdAt*string
updatedAt*string
paymentMethods*array<>
planProducts*array<>
billingDates?array<>
_count?
Ejemplo de solicitud
curl -X GET 'https://api.unopago.com/v1/plans/string'
Ejemplo de respuesta
{  "schedule": "SUBSCRIPTION_START",  "billingCycle": "WEEKLY",  "currency": "VES",  "pricingMode": "CURRENCY",  "status": "ACTIVE",  "lateFeeType": "PERCENTAGE",  "discountValueType": "PERCENTAGE",  "id": "string",  "accountId": "string",  "name": "string",  "description": "string",  "price": 0,  "advanceBillingDays": -9007199254740991,  "advanceDueDateDays": -9007199254740991,  "startDate": "string",  "endDate": "string",  "lateFee": 0,  "discountValue": 0,  "discountExpiresIn": -9007199254740991,  "singleInvoicePerSubscription": true,  "createdAt": "string",  "updatedAt": "string",  "paymentMethods": [    {      "id": "string",      "planId": "string",      "accountPaymentMethodId": "string",      "createdAt": "string",      "updatedAt": "string",      "accountPaymentMethod": {        "method": "BANK_TRANSFER",        "scopes": [          "PORTAL"        ],        "id": "string",        "accountId": "string",        "isDefault": true,        "displayName": "string",        "enabled": true,        "isPayerCharged": true,        "fee": 0,        "processorId": "string",        "createdAt": "string",        "updatedAt": "string"      }    }  ],  "planProducts": [    {      "id": "string",      "accountId": "string",      "planId": "string",      "productId": "string",      "quantity": -9007199254740991,      "amount": 0,      "createdAt": "string",      "updatedAt": "string",      "product": {        "currency": "VES",        "id": "string",        "accountId": "string",        "unitId": "string",        "externalId": "string",        "code": "string",        "name": "string",        "description": "string",        "imageUrl": "string",        "price": 0,        "exento": true,        "isService": true,        "isActive": true,        "availableInPortal": true,        "availableForSale": true,        "availableInStorefront": true,        "isSoldOut": true,        "categoryId": "string",        "position": -9007199254740991,        "ivaRatePercent": -9007199254740991,        "createdAt": "string",        "updatedAt": "string"      }    }  ],  "billingDates": [    {      "id": "string",      "planId": "string",      "issueDate": "string",      "dueDate": "string",      "description": "string",      "createdAt": "string",      "updatedAt": "string"    }  ],  "_count": {    "subscriptions": 0  }}