ves-io-schema-signup-CustomAPI-Create

Examples of performing signup CustomAPI Create

Usecase:

Create signup

Request:

Request using vesctl:

vesctl request rpc signup.CustomAPI.Create -i request.yaml --uri /no_auth/signup --http-method POST

where file request.yaml has following contents:

          spec:
  company: {}
  companyContact: {}
  companyName: some-company
  contactNumber: "724658123"
  currency: USD
  customer:
    contacts: []
    email: user-1@ves.io
    firstName: FN
    lastName: LN
  customerContact: {}
  domain: test-domain
  email: user-1@ves.io
  firstName: FN
  lastName: LN
  locale: en-US
  paymentProviderToken: token_123456789
  supportPlanName: support-plan-a
  token: tok_123456789
  tosAccepted: "1569662395000"
  type: ENTERPRISE
  usagePlanName: usage-plan-a

        

vesctl yaml response:

          metadata:
  annotations: {}
  labels: {}
  name: su-e0b3f128-cc7c-46f3-a781-7307b989d259
  namespace: system
  uid: e0b3f128-cc7c-46f3-a781-7307b989d259
spec:
  gcSpec:
    billingAddress: {}
    company:
      contacts: []
      groups: []
    companyContact: {}
    companyName: test
    contactNumber: "123456789"
    currency: USD
    customer:
      contacts: []
      groups: []
    customerContact: {}
    domain: testdomain
    email: test@test.com
    firstName: Test
    infraprotectInfo:
      prefixes:
      - 0.0.0.0/0
      uuid: 93b5922c-a27c-47f6-98c0-287633141976
    lastName: Test
    locale: en_US
    paymentProviderToken: tok_1234567899
    supportPlanName: support-plan-1
    token: ed865e78-fafc-4b64-a65d-cf7fa2e9d776
    tosAccepted: "1234567"
    tosVersion: v1.2
    usagePlanName: usage-plan-1
systemMetadata:
  finalizers: []
  labels: {}
  namespace: []
  tenant: ves-io
  uid: e0b3f128-cc7c-46f3-a781-7307b989d259

        

Request using curl:

          curl -X 'POST' -d '{"spec":{"locale":"en-US","type":"ENTERPRISE","first_name":"FN","last_name":"LN","email":"user-1@ves.io","contact_number":"724658123","domain":"test-domain","currency":"USD","payment_provider_token":"token_123456789","tos_accepted":"1569662395000","customer":{"first_name":"FN","last_name":"LN","email":"user-1@ves.io","contacts":[]},"customer_contact":{},"company_name":"some-company","company":{},"company_contact":{},"token":"tok_123456789","support_plan_name":"support-plan-a","usage_plan_name":"usage-plan-a"}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_2__8qnt6fwd5dvglr1xqq6l8b7w0000gp_T_go-build2604632300_b001_apidocs.test/host=C02FN35BMD6R/svc=S:examplesvc/site=mytestce01' 'https://localhost:61797/no_auth/signup'
        

curl response:

          HTTP/1.1 200 OK
Content-Type: application/json
Date: Fri, 03 Nov 2023 15:27:21 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "su-e0b3f128-cc7c-46f3-a781-7307b989d259",
    "namespace": "system",
    "uid": "e0b3f128-cc7c-46f3-a781-7307b989d259",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "e0b3f128-cc7c-46f3-a781-7307b989d259",
    "creation_timestamp": null,
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "ves-io",
    "creator_class": "",
    "creator_id": "",
    "creator_cookie": "",
    "trace_info": "",
    "object_index": 0,
    "namespace": [
    ],
    "owner_view": null,
    "sre_disable": false,
    "vtrp_id": "",
    "vtrp_stale": false,
    "labels": {
    }
  },
  "spec": {
    "gc_spec": {
      "locale": "en_US",
      "type": "UNKNOWN",
      "first_name": "Test",
      "last_name": "Test",
      "email": "test@test.com",
      "contact_number": "123456789",
      "domain": "testdomain",
      "currency": "USD",
      "payment_provider_token": "tok_1234567899",
      "billing_address": {
        "contact_type": "MAILING",
        "phone_number": "",
        "address1": "",
        "address2": "",
        "city": "",
        "county": "",
        "state": "",
        "state_code": "",
        "country": "",
        "zip_code": ""
      },
      "tos_accepted": "1234567",
      "customer": {
        "type": "USER",
        "locale": "",
        "first_name": "",
        "last_name": "",
        "email": "",
        "contacts": [
        ],
        "tos_accepted": "",
        "domain_owner": false,
        "idm_type": "SSO",
        "state": "StateUndefined",
        "last_login_timestamp": null,
        "groups": [
        ],
        "tos_version": "",
        "tos_accepted_at": null,
        "sync_mode": "SELF"
      },
      "customer_contact": {
        "contact_type": "MAILING",
        "phone_number": "",
        "address1": "",
        "address2": "",
        "city": "",
        "county": "",
        "state": "",
        "state_code": "",
        "country": "",
        "zip_code": ""
      },
      "company_name": "test",
      "company": {
        "type": "USER",
        "locale": "",
        "first_name": "",
        "last_name": "",
        "email": "",
        "contacts": [
        ],
        "tos_accepted": "",
        "domain_owner": false,
        "idm_type": "SSO",
        "state": "StateUndefined",
        "last_login_timestamp": null,
        "groups": [
        ],
        "tos_version": "",
        "tos_accepted_at": null,
        "sync_mode": "SELF"
      },
      "company_contact": {
        "contact_type": "MAILING",
        "phone_number": "",
        "address1": "",
        "address2": "",
        "city": "",
        "county": "",
        "state": "",
        "state_code": "",
        "country": "",
        "zip_code": ""
      },
      "token": "ed865e78-fafc-4b64-a65d-cf7fa2e9d776",
      "support_plan_name": "support-plan-1",
      "usage_plan_name": "usage-plan-1",
      "tos_version": "v1.2",
      "tax_exempt": "TAX_UNKNOWN",
      "infraprotect_info": {
        "asn": 0,
        "uuid": "93b5922c-a27c-47f6-98c0-287633141976",
        "prefixes": [
          "0.0.0.0/0"
        ],
        "arbor_cid": "",
        "primary_network_name": ""
      },
      "billing_provider_account_id": "",
      "tos_accepted_at": null,
      "sfdc_subscription_id": "",
      "crm_info": null
    }
  }
}