SubscriptionCreated
v1.0.0

An event raised whenever new subscription created.
SubscriptionCreated Schema (yml)
openapi: 3.0.0
info:
  version: "1.0.0"
  title: SubscriptionCreated
paths: {}
components:
  schemas:
    SubscriptionCreated:
      type: object
      required:
        - metadata
        - data
      properties:
        data:
          "$ref": "#/components/schemas/Data"
        metadata:
          "$ref": "#/components/schemas/Metadata"
    Data:
      type: object
      required:
        - subscriptionId
        - autoRenew
        - balance
        - brand
        - country
        - currency
        - cycleStartedAt
        - deliveryAddresses
        - deliveryDays
        - deliveryTime
        - email
        - kitchen
        - language
        - macrosBag
        - macrosData
        - macrosPreferences
        - macrosType
        - planId
        - planDietType
        - planFoodType
        - planFrequency
        - planPricePerDay
        - name
        - phoneNumber
        - startedAt
        - timezone
        - withCutlery
        - tier
        - amount
        - discount
        - amountPaid
        - vat
      properties:
        subscriptionId:
          type: string
        autoRenew:
          type: boolean
        balance:
          type: object
          required:
            - AED
            - BHD
            - KWD
            - OMR
            - QAR
            - SAR
          properties:
            AED:
              type: number
            BHD:
              type: number
            KWD:
              type: number
            OMR:
              type: number
            QAR:
              type: number
            SAR:
              type: number
        brand:
          type: string
        country:
          type: string
        currency:
          type: string
        cycleStartedAt:
          type: string
          format: date
        deliveryAddresses:
          type: array
          items:
            type: object
            required:
              - id
              - default
              - country
              - lat
              - lng
            properties:
              id:
                type: string
              default:
                type: boolean
              apartment:
                type: string
              building:
                type: string
              city:
                type: string
              country:
                type: string
              district:
                type: string
              lat:
                type: number
              lng:
                type: number
              name:
                type: string
              notes:
                type: string
              region:
                type: string
              street:
                type: string
              type:
                type: string
        deliveryDays:
          type: array
          items:
            type: number
        deliveryTime:
          type: string
        email:
          type: string
        kitchen:
          type: string
        language:
          type: string
        macrosBag:
          type: object
          properties:
            cal:
              type: number
            carbs:
              type: object
              properties:
                max:
                  type: number
                min:
                  type: number
            fat:
              type: object
              properties:
                max:
                  type: number
                min:
                  type: number
            protein:
              type: object
              properties:
                max:
                  type: number
                min:
                  type: number
        macrosData:
          type: object
          properties:
            activityLevel:
              type: string
            dob:
              type: string
              format: date
            gender:
              type: string
            goal:
              type: string
            height:
              type: number
            targetWeight:
              type: number
            weight:
              type: number
            weightGoal:
              type: number
        macrosPreferences:
          type: object
          properties:
            carbs:
              type: object
              properties:
                max:
                  type: number
                min:
                  type: number
            fat:
              type: object
              properties:
                max:
                  type: number
                min:
                  type: number
            preset:
              type: string
            protein:
              type: object
              properties:
                max:
                  type: number
                min:
                  type: number
        macrosType:
          type: string
        planId:
          type: string
        planDietType:
          type: string
        planExtras:
          type: array
          items:
            type: string
        planFoodType:
          type: array
          items:
            type: string
        planFrequency:
          type: string
        planPricePerDay:
          type: number
        name:
          type: string
        amount:
          type: number
        discount:
          type: number
        amountPaid:
          type: number
        vat:
          type: number
        paymentMethod:
          type: string
        paymentCardPrefix:
          type: string
        phoneNumber:
          type: string
        startedAt:
          type: string
          format: date
        timezone:
          type: string
        invitationCode:
          type: string
        withCutlery:
          type: boolean
        isGifted:
          type: boolean
        isNonConfirmed:
          type: boolean
        tier:
          type: string
        isTrialSubscription:
          type: boolean
        couponCode:
          type: string
    Metadata:
      type: object
      required:
        - serviceFunction
        - version
      properties:
        serviceFunction:
          type: string
        version:
          type: string
Edit this pageLast updated on 2024/4/2