Skip to main content
POST
/
categories
/
{categoryId}
/
subcategories
/
{subcategoryId}
/
objects
Create Object
curl --request POST \
  --url https://api.g2cplatform.com/v2/categories/{categoryId}/subcategories/{subcategoryId}/objects \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "externalId": "<string>",
  "name": "<string>",
  "description": "<string>",
  "summary": "<string>",
  "owner": "<string>",
  "metadata": {}
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "externalId": "<string>",
  "name": "<string>",
  "status": "active",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "summary": "<string>",
  "owner": "<string>",
  "categoryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "subcategoryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "metadata": {},
  "blockchain": {
    "txId": "<string>",
    "lastTxId": "<string>",
    "eventCount": 123
  }
}

Authorizations

X-API-Key
string
header
required

API key for authenticating requests. Include in X-API-Key header.

Path Parameters

categoryId
string<uuid>
required

Category identifier

subcategoryId
string<uuid>
required

Subcategory identifier

Body

application/json
externalId
string
required

External identifier for the object (must be unique within company)

Required string length: 1 - 100
name
string
required

Object name

Required string length: 2 - 200
description
string

Detailed description of the object

Maximum string length: 1000
summary
string

Brief summary of the object

Maximum string length: 500
owner
string

Current owner of the object

Maximum string length: 100
metadata
object

Additional metadata as key-value pairs

Response

Object created successfully

id
string<uuid>
required
externalId
string
required
name
string
required
status
enum<string>
required
Available options:
active,
inactive,
stolen,
transferred,
archived
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
description
string
summary
string
owner
string
categoryId
string<uuid>
subcategoryId
string<uuid>
metadata
object
blockchain
object