Company Data Layout

Structure of company profile data returned by the graphiteConnect public API, including JSON hierarchy and the schema API.

Company Data Layout

Company profile data is returned by the graphiteConnect public API as a hierarchical JSON structure of key-value pairs. Understanding this structure is essential for mapping Graphite data to your ERP or downstream system.

JSON Structure

Each key in the JSON response corresponds to a question (or answer key) in the company's profile. The associated value holds the supplier's answer for that question.

{
  "Company_Name": "Acme Corporation",
  "Corporate_Address_Country": "US",
  "Corporate_Address_1": "123 Main St",
  "ERP_Record": [
    {
      "_id": "efe54134411f10c669026cc391b7ea08",
      "ERP_ID": "VENDOR-10042",
      "Integration_ERP_Status": "success",
      "Integration_ERP_ON": "y"
    }
  ],
  "Locations_List": [ ... ],
  "Banking_Account_Object": [ ... ]
}

Key Concepts

  • Root-level keys hold single-value answers (strings, numbers, etc.).
  • Group keys hold arrays of JSON objects representing one-to-many data (addresses, bank accounts, ERP records).
  • _id fields within group arrays are internal graphiteConnect identifiers. They are used in:
    • The PATCH /profile/{publicId} endpoint to target a specific group instance for update.
    • The POST /changes/acknowledge endpoint as the instanceId parameter.
    • File retrieval APIs when the group contains file objects.

One-to-Many Data

Some data in a supplier profile is one-to-many, represented as arrays of JSON objects. For example, a supplier may have multiple addresses, bank accounts, or ERP records. Every instance in such an array includes a unique _id field:

{
  "Locations_List": [
    {
      "_id": "23ab88546bfc97223f2c4802936f26e4",
      "Location_Name": "Headquarters",
      "Address_1": "123 Main St",
      "Address_Country": "US"
    },
    {
      "_id": "e82d1321ed4d374e78350a9ef74610a2",
      "Location_Name": "Warehouse",
      "Address_1": "456 Industrial Blvd",
      "Address_Country": "US"
    }
  ]
}

When patching group data, include the _id of each instance you want to update along with the fields to change.

Associating Answer Keys with Question Text

The answer keys used in the JSON response are short technical identifiers (e.g., Corporate_Address_Country). To find the full human-readable question text associated with an answer key, call the schema API:

GET /api/public/api/v1/profile/{publicId}?includeMetadata=true

The schema API returns data in a similar JSON key-value format, where each answer key maps to its question metadata. Dependent (child) questions are returned nested under their parent.

Metadata Fields

The schema API returns the following metadata for each answer key:

FieldDescription
Length requirementsMaximum character length for free-text answers
EditabilityWhether the question can be edited via the API
Possible valuesFor multiple-choice questions, the set of allowable values

Field-Specific Data Layouts

For detailed documentation on specific groups within the profile, see: