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-ccfaf285-67ce-4066-b217-641b35efb662
  namespace: system
  uid: ccfaf285-67ce-4066-b217-641b35efb662
spec:
  gcSpec:
    billingAddress: {}
    company:
      contacts: []
    companyContact: {}
    companyName: test
    contactNumber: "123456789"
    currency: USD
    customer:
      contacts: []
    customerContact: {}
    domain: testdomain
    email: test@test.com
    firstName: Test
    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: []
  namespace: []
  tenant: ves-io
  uid: ccfaf285-67ce-4066-b217-641b35efb662

Request using curl:

curl -X 'POST' -d '{"spec":{"locale":"en-US","type":"ENTERPRISE","firstName":"FN","lastName":"LN","email":"user-1@ves.io","contactNumber":"724658123","domain":"test-domain","currency":"USD","paymentProviderToken":"token_123456789","tosAccepted":"1569662395000","customer":{"firstName":"FN","lastName":"LN","email":"user-1@ves.io","contacts":[]},"customerContact":{},"companyName":"some-company","company":{},"companyContact":{},"token":"tok_123456789","supportPlanName":"support-plan-a","usagePlanName":"usage-plan-a"}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build743694289_b001_apidocs.test/host=docker-desktop' 'https://localhost:36671/no_auth/signup'

curl response:

HTTP/1.1 200 OK
Content-Type: application/json
Date: Thu, 02 Jul 2020 15:53:32 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "su-ccfaf285-67ce-4066-b217-641b35efb662",
    "namespace": "system",
    "uid": "ccfaf285-67ce-4066-b217-641b35efb662",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "ccfaf285-67ce-4066-b217-641b35efb662",
    "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
  },
  "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": "",
        "country": "",
        "zip_code": ""
      },
      "tos_accepted": "1234567",
      "customer": {
        "type": "USER",
        "locale": "",
        "first_name": "",
        "last_name": "",
        "email": "",
        "contacts": [
        ],
        "tos_accepted": "",
        "domain_owner": false,
        "idm_type": "SSO"
      },
      "customer_contact": {
        "contact_type": "MAILING",
        "phone_number": "",
        "address1": "",
        "address2": "",
        "city": "",
        "county": "",
        "state": "",
        "country": "",
        "zip_code": ""
      },
      "company_name": "test",
      "company": {
        "type": "USER",
        "locale": "",
        "first_name": "",
        "last_name": "",
        "email": "",
        "contacts": [
        ],
        "tos_accepted": "",
        "domain_owner": false,
        "idm_type": "SSO"
      },
      "company_contact": {
        "contact_type": "MAILING",
        "phone_number": "",
        "address1": "",
        "address2": "",
        "city": "",
        "county": "",
        "state": "",
        "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"
    }
  }
}