{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/kibo-commerce/main/json-schema/kibo-commerce-carrier-credential-schema.json",
  "title": "CarrierCredential",
  "description": "Stores a reference to a Mozu.ShippingAdmin.Contracts.Carriers.CarrierCredentialSet for use at different levels.\r\nValid levels include Site, Location Group, and Location. Different levels may be used for rates versus labels.\r\nSite level is overriden by Location Group level which is overriden by Location level.",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kibo-commerce-shipping-openapi.yml#/components/schemas/CarrierCredential",
  "properties": {
    "auditInfo": {
      "$ref": "#/$defs/AuditInfo"
    },
    "carrierId": {
      "description": "The Carrier ID associated with this carrier credential.\r\nUsually the short name of a carrier (e.g., \"FedEx\").",
      "type": [
        "string",
        "null"
      ]
    },
    "credentialSet": {
      "$ref": "#/$defs/CarrierCredentialSet"
    },
    "locationCode": {
      "description": "The Location Code associated with this carrier credential, if any.",
      "type": [
        "string",
        "null"
      ]
    },
    "locationGroupCode": {
      "description": "The Location Group Code associated with this carrier credential, if any.",
      "type": [
        "string",
        "null"
      ]
    },
    "siteId": {
      "description": "The Site ID associated with this carrier credential, if any.",
      "format": "int32",
      "type": [
        "integer",
        "null"
      ]
    }
  },
  "type": "object",
  "$defs": {
    "AuditInfo": {
      "properties": {
        "createBy": {
          "type": [
            "string",
            "null"
          ]
        },
        "createDate": {
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "updateBy": {
          "type": [
            "string",
            "null"
          ]
        },
        "updateDate": {
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "CarrierCredentialSet": {
      "description": "Stores a set of <see cref=\"T:Mozu.ShippingAdmin.Contracts.Carriers.CarrierCredentialSetValue\">carrier credential key-value pairs</see>.\r\nSets are stored at the tenant level and referenced by a Mozu.ShippingAdmin.Contracts.Carriers.CarrierCredential.",
      "properties": {
        "auditInfo": {
          "$ref": "#/$defs/AuditInfo"
        },
        "carrierId": {
          "description": "The Carrier ID associated with this credential set.\r\nUsually the short name of a carrier (e.g., \"FedEx\").",
          "type": [
            "string",
            "null"
          ]
        },
        "code": {
          "description": "A unique code identifying this credential set.\r\nThe code is only guaranteed to be unique at the tenant and carrier level.",
          "type": [
            "string",
            "null"
          ]
        },
        "integrationId": {
          "description": "Specifies the ID returned from an integration.",
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "description": "A name (i.e., nickname) for this credential set.",
          "type": [
            "string",
            "null"
          ]
        },
        "values": {
          "description": "A collection of values contained in this credential set.",
          "items": {
            "$ref": "#/$defs/CarrierCredentialSetValue"
          },
          "type": [
            "array",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "CarrierCredentialSetValue": {
      "properties": {
        "key": {
          "type": [
            "string",
            "null"
          ]
        },
        "value": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    }
  }
}