Subscriptions Data Models

Here are the different models you can subscribe to while doing a sync.

Model IDEvent Data KeyDescription
customer_infocustomerInfoContains information about the customer
subscription_infosubscriptionInfoContains information about the subscriptions of the customer

All these models have been detailed out below for your reference.

📘

Use the Model ID for syncs

While invoking sync APIs, pass these model IDs in order to get the desired data.
Make sure the dataTypein sync request body issubscription

Customer Info

Model ID: customer_info

NameTypeDescription
idString
companyIdString
businessEntityIdString
companyString
entityCodeString
contactsList[Contact]
emailsList[String]
phonesList[String]
firstNameString
lastNameString
billingAddressAddress

Contact

NameTypeDescription
idString
firstNameString
lastNameString
emailString
phoneString
labelString

Subscription Info

Model ID: subscription_info

NameTypeDescription
idString
currencyCodeString
statusEnum
billingCyclesString
startedAtDate
updatedAtDate
cancelledAtDate
currentTermStartDate
currentTermEndDate
nextBillingAtDate
subscriptionItemsList[SubscriptionItem]
itemTiersList[ItemTier]

Subscription Item

NameTypeDescription
priceItemIdString
itemTypeEnum
quantityDouble
unitPriceDouble
amountDouble
billingCyclesInt

Item Tier

NameTypeDescription
priceItemIdString
startingUnitDouble
endingUnitDouble
priceDouble

Event Data Example

{
    "customerInfo": {
      "id": "6oadrU621jU24Ber",
      "companyId": "company1",
      "businessEntityId": "business1",
      "company": "Knit",
      "entityCode": "NOT_SPECIFIED",
      "contacts": [
        {
          "id": "contact_16CRgQU9MDaUE1IU",
          "firstName": "Kendall",
          "lastName": "Roy",
          "email": "[email protected]",
          "phone": "41648464",
          "label": "Sales"
        }
      ],
      "emails": [
        "[email protected]"
      ],
      "phones": [
        "486468287"
      ],
      "firstName": "Kendall",
      "lastName": "Roy",
      "billingAddress": {
        "addressLine1": "Street 1",
        "addressLine2": "Road 2",
        "city": "New York",
        "state": "New York",
        "country": "US",
        "zipCode": "100001",
        "addressType": "BILLING"
      }
    },
    "subscriptionInfo": {
      "id": "169vwVU9M0QBFkI",
      "currencyCode": "INR",
      "status": "CANCELLED",
      "billingCycles": null,
      "startedAt": "2024-04-08T11:57:23Z",
      "updatedAt": "2024-04-09T11:57:25Z",
      "cancelledAt": "2024-04-09T11:57:24Z",
      "currentTermStart": "2024-04-08T11:57:23Z",
      "currentTermEnd": "2024-04-09T11:57:23Z",
      "nextBillingAt": null,
      "subscriptionItems": [
        {
          "priceItemId": "getknit-INR-Daily",
          "itemType": "PLAN",
          "quantity": 1.0,
          "unitPrice": 100.0,
          "amount": 100.0,
          "billingCycles": null
        }
      ],
      "itemTiers": [
        {
          "priceItemId": "getknit-INR-Daily",
          "startingUnit": 1.0,
          "endingUnit": 10.0,
          "price": 100.0
        },
        {
          "priceItemId": "getknit-INR-Daily",
          "startingUnit": 11.0,
          "endingUnit": null,
          "price": 80.0
        }
      ]
    }
  }