Codat · Schema

Commerce: Company profile

In the Codat system, company profile includes standard commercial details about a linked company, such as their address, phone number, and company registration.

Unified_API
View JSON Schema on GitHub

JSON Schema

codat-commercecompanyinfo-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/CommerceCompanyInfo",
  "title": "Commerce: Company profile",
  "description": "In the Codat system, company profile includes standard commercial details about \na linked company, such as their address, phone number, and company registration.\n",
  "type": "object",
  "allOf": [
    {
      "type": "object",
      "properties": {
        "companyName": {
          "type": "string",
          "description": "The name of the company",
          "example": "Codat"
        },
        "commercePlatformRef": {
          "type": "string",
          "description": "Identifier or reference for the company in the commerce software"
        },
        "companyLegalName": {
          "type": "string",
          "description": "The full legal name of the company",
          "example": "Codat Limited"
        },
        "addresses": {
          "type": "array",
          "description": "Addresses associated with the company",
          "items": {
            "$ref": "#/components/schemas/CommerceAddress"
          }
        },
        "phoneNumbers": {
          "type": "array",
          "description": "Phone numbers associated with the company",
          "items": {
            "$ref": "#/components/schemas/PhoneNumber"
          }
        },
        "webLinks": {
          "description": "Weblinks associated with the company",
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/WebLink"
          }
        },
        "registrationNumber": {
          "description": "The registration number of the company",
          "type": "string",
          "examples": [
            10480375
          ]
        },
        "baseCurrency": {
          "$ref": "#/components/schemas/SourceAccount/properties/currency"
        },
        "accountBalances": {
          "description": "The available and current cash balances for the company's accounts",
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/CommerceCompanyInfo/definitions/accountBalance"
          }
        },
        "sourceUrls": {
          "description": "URL addresses for the originating system. For example, potential use cases include 'deeplinking' to the originating system",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "example": {
            "url1": "https://connect.sandbox.com/v2/customers",
            "url2": "https://connect.sandbox.com/v2/disputes"
          }
        }
      }
    },
    {
      "$ref": "#/components/schemas/CommerceOrder/allOf/2"
    },
    {
      "$ref": "#/components/schemas/CommerceOrder/allOf/3"
    }
  ],
  "definitions": {
    "accountBalance": {
      "title": "Account Balance",
      "type": "object",
      "x-internal": true,
      "properties": {
        "available": {
          "description": "The account's current balance",
          "type": "number",
          "format": "decimal"
        },
        "pending": {
          "description": "Funds that are not yet available in the balance",
          "type": "number",
          "format": "decimal"
        },
        "reserved": {
          "description": "Funds reserved as holdings",
          "format": "decimal"
        },
        "currency": {
          "description": "The currency of the account",
          "allOf": [
            {
              "$ref": "#/components/schemas/SourceAccount/properties/currency"
            }
          ]
        }
      }
    }
  }
}