Skip to main content
All updates are tracked as immutable events for complete traceability.

Request

curl -X PUT "https://api.g2cplatform.com/v2/objects/123e4567-e89b-12d3-a456-426614174000" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "update",
    "name": "MacBook Pro 16-inch (Updated)",
    "description": "Development laptop - updated after maintenance",
    "owner": "Jane Smith",
    "eventDescription": "Ownership transferred to Jane Smith",
    "performedBy": "IT Administrator",
    "metadata": {
      "serialNumber": "C02XK1F2JGH7",
      "lastMaintenance": "2024-03-15",
      "status": "serviced"
    }
  }'

Path Parameters

ParameterTypeRequiredDescription
objectIdstring (uuid)YesUnique identifier for the object

Request Body

FieldTypeRequiredDescription
actionstringYesType of action: update, transfer, repair, report_stolen
namestringNoUpdated object name
descriptionstringNoUpdated description
summarystringNoUpdated summary
ownerstringNoNew owner (required for transfer action)
eventDescriptionstringNoDescription of the event being recorded
performedBystringNoPerson or system performing the action
metadataobjectNoUpdated metadata as key-value pairs

Response

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "externalId": "LAPTOP-001",
  "name": "MacBook Pro 16-inch (Updated)",
  "description": "Development laptop - updated after maintenance",
  "summary": "High-performance laptop for software development",
  "owner": "Jane Smith",
  "status": "active",
  "categoryId": "cat_987fcdeb-51a2-43d8-9f0e-123456789abc",
  "subcategoryId": "sub_456def78-90ab-12cd-34ef-567890123456",
  "metadata": {
    "serialNumber": "C02XK1F2JGH7",
    "lastMaintenance": "2024-03-15",
    "status": "serviced"
  },
  "createdAt": "2024-03-15T10:30:00Z",
  "updatedAt": "2024-03-15T16:20:00Z",
  "blockchain": {
    "txId": "abc123...def456",
    "lastTxId": "xyz789...uvw012",
    "eventCount": 6
  }
}

Action Types

ActionDescriptionRequired Fields
updateGeneral information updateNone (optional fields as needed)
transferChange ownershipowner
repairRecord repair/maintenanceeventDescription recommended
report_stolenMark as stoleneventDescription recommended

Error Responses

Status CodeDescription
400Invalid request data or missing required fields
401Unauthorized - invalid API key
404Object not found
500Internal server error

Usage Notes

  • All updates create new blockchain events for audit trail
  • The action field determines the type of update being performed
  • Use transfer action when changing ownership
  • Metadata updates are merged with existing metadata
  • Each update increments the eventCount in blockchain information
  • Updates are immutable once recorded on the blockchain