Create a vertex account

How to create a vertex account via API

To create a new vertex account, send a POST request to the /api/vertex_accounts endpoint, passing the resource arguments in the request body.

Request

POST https://yourdomain.commercelayer.io/api/vertex_accounts

Arguments

Body Parameter
Type
Required

type

string

Required

attributes.name

string

Required

attributes.reference

string

Optional

attributes.reference_origin

string

Optional

attributes.metadata

object

Optional

attributes.kind

string

Optional, default is 'cloud'

attributes.baseurl

string

Optional, if cloud

attributes.client_id

string

Required

attributes.client_secret

string

Required

attributes.commit_invoice

boolean

Optional

Example

The following request creates a new vertex account:

curl -g -X POST \
  'https://yourdomain.commercelayer.io/api/vertex_accounts' \
  -H 'Accept: application/vnd.api+json' \
  -H 'Authorization: Bearer your-access-token' \
  -H 'Content-Type: application/vnd.api+json' \
  -d '{
  "data": {
    "type": "vertex_accounts",
    "attributes": {
      "name": "Personal tax calculator",
      "client_id": "xxx-yyy-zzz",
      "client_secret": "xxx-yyy-zzz"
    }
  }
}'

Last updated