object TransactionPaginatedList
{
  "allOf": [
    {
      "$ref": "#/components/schemas/PaginatedList"
    },
    {
      "properties": {
        "results": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/Transaction"
          }
        }
      }
    }
  ]
}
string TransactionStatusEnum
{
  "enum": [
    "WAITING",
    "QUEUED",
    "SUCCESS",
    "ERROR",
    "REFUNDED",
    "REFUNDPENDING",
    "REFUNDREJECTED"
  ],
  "type": "string",
  "example": "SUCCESS",
  "description": "Indicates the status of the Transaction."
}
object TransactionsCreateShippingLabelRequest
{
  "oneOf": [
    {
      "$ref": "#/components/schemas/TransactionCreateRequest"
    },
    {
      "$ref": "#/components/schemas/InstantTransactionRequestBody"
    }
  ]
}
object UPSConnectExistingOwnAccountParameters
{
  "type": "object",
  "title": "UPS account parameters",
  "required": [
    "ups_agreements",
    "account_number",
    "title",
    "company",
    "full_name",
    "phone",
    "billing_address_street1",
    "billing_address_city",
    "billing_address_zip",
    "billing_address_state",
    "billing_address_country_iso2",
    "collec_zip",
    "collec_country_iso2",
    "has_invoice",
    "email"
  ],
  "properties": {
    "email": {
      "type": "string",
      "example": "hippo@shippo.com"
    },
    "phone": {
      "type": "string",
      "example": "1112223333"
    },
    "title": {
      "type": "string",
      "example": "Manager",
      "description": "User's title, e.g. including but not limited to Manager, Doctor, Artist, Engineer, Mr, Ms, Mrs, Mx"
    },
    "company": {
      "type": "string",
      "example": "Shippo",
      "description": "Company name. Full name is acceptable in this field if the user has no company name"
    },
    "full_name": {
      "type": "string",
      "example": "Shippo Meister"
    },
    "collec_zip": {
      "type": "string",
      "example": "94103",
      "maxLength": 5,
      "minLength": 5,
      "description": "Zip code of the collection/pickup address"
    },
    "has_invoice": {
      "type": "boolean",
      "description": "true if user has been issued a UPS invoice within the past 90 days for the US or Canada; and 45 days for any other countries. User can use data from any of the last 3 invoices"
    },
    "invoice_date": {
      "type": "string",
      "example": "20210529",
      "description": "Only required if has_invoice is true. Date the invoice was issued. yyyymmdd format"
    },
    "currency_code": {
      "type": "string",
      "example": "USD",
      "maxLength": 3,
      "minLength": 3,
      "description": "Only required if has_invoice is true. 3-letter currency code associated with invoice_value"
    },
    "invoice_value": {
      "type": "string",
      "example": "11.23",
      "description": "Only required if has_invoice is true. Max 16 digits before decimal and 2 digits after decimal"
    },
    "account_number": {
      "type": "string",
      "example": "94567e",
      "description": "The UPS account number"
    },
    "invoice_number": {
      "type": "string",
      "example": "1112234",
      "maxLength": 15,
      "minLength": 1
    },
    "ups_agreements": {
      "type": "boolean",
      "description": "Whether the user agrees to the UPS terms and conditions or not. Error 400 will be returned if passed in as false"
    },
    "aia_country_iso2": {
      "type": "string",
      "example": "US",
      "description": "Only required if has_invoice is true. Country associated with the account that issued the invoice"
    },
    "invoice_controlid": {
      "type": "string",
      "example": "1234",
      "maxLength": 4,
      "minLength": 4,
      "description": "Only required if aia_country_iso2 is US and has_invoice is true."
    },
    "billing_address_zip": {
      "type": "string",
      "example": "94103",
      "maxLength": 5,
      "minLength": 5
    },
    "collec_country_iso2": {
      "type": "string",
      "example": "US",
      "maxLength": 2,
      "minLength": 2
    },
    "billing_address_city": {
      "type": "string",
      "example": "San Francisco"
    },
    "billing_address_state": {
      "type": "string",
      "example": "CA",
      "maxLength": 2,
      "minLength": 2
    },
    "billing_address_street1": {
      "type": "string",
      "example": "731 Market St"
    },
    "billing_address_street2": {
      "type": "string",
      "example": "STE 200",
      "description": "Empty string acceptable for billing_address_street2"
    },
    "billing_address_country_iso2": {
      "type": "string",
      "example": "US",
      "maxLength": 2,
      "minLength": 2
    }
  },
  "description": "An array of additional parameters for the account, such as e.g. password or token.\nPlease check the <a href=\"https://docs.goshippo.com/docs/carriers/carrieraccounts/\">carrier accounts tutorial</a> page for the parameters per carrier.<br> \nTo protect account information, this field will be masked in any API response."
}
object UPSCreateNewOwnAccountParameters
{
  "type": "object",
  "required": [
    "ups_agreements",
    "email",
    "full_name",
    "company",
    "phone",
    "billing_address_street1",
    "billing_address_city",
    "billing_address_zip",
    "billing_address_state",
    "billing_address_country_iso2",
    "pickup_address_same_as_billing_address"
  ],
  "properties": {
    "email": {
      "type": "string",
      "example": "hippo@shippo.com"
    },
    "phone": {
      "type": "string",
      "example": "1112223333"
    },
    "company": {
      "type": "string",
      "example": "Shippo",
      "description": "Company name. Full name is acceptable in this field if the user has no company name"
    },
    "full_name": {
      "type": "string",
      "example": "Shippo Meister"
    },
    "ups_agreements": {
      "type": "boolean",
      "description": "Whether the user agrees to the UPS terms and conditions or not. Error 400 will be returned if passed in as false"
    },
    "pickup_address_zip": {
      "type": "string",
      "example": "94103",
      "maxLength": 5,
      "minLength": 5,
      "description": "User's pickup address zip code. Only required if pickup_address_same_as_billing_address is false"
    },
    "billing_address_zip": {
      "type": "string",
      "example": "94103",
      "maxLength": 5,
      "minLength": 5
    },
    "pickup_address_city": {
      "type": "string",
      "example": "San Francisco",
      "description": "User's pickup address city. Only required if pickup_address_same_as_billing_address is false"
    },
    "billing_address_city": {
      "type": "string",
      "example": "San Francisco"
    },
    "pickup_address_state": {
      "type": "string",
      "example": "CA",
      "maxLength": 2,
      "minLength": 2,
      "description": "User's pickup address state. Only required if pickup_address_same_as_billing_address is false"
    },
    "billing_address_state": {
      "type": "string",
      "example": "CA",
      "maxLength": 2,
      "minLength": 2
    },
    "pickup_address_street1": {
      "type": "string",
      "example": "731 Market St",
      "description": "User's pickup address street 1. Only required if pickup_address_same_as_billing_address is false"
    },
    "pickup_address_street2": {
      "type": "string",
      "example": "STE 200",
      "description": "User's pickup street 2. Only used if pickup_address_same_as_billing_address is false, empty string acceptable"
    },
    "billing_address_street1": {
      "type": "string",
      "example": "731 Market St"
    },
    "billing_address_street2": {
      "type": "string",
      "example": "STE 200",
      "description": "Empty string acceptable for billing_address_street2"
    },
    "pickup_address_country_iso2": {
      "type": "string",
      "example": "US",
      "maxLength": 2,
      "minLength": 2,
      "description": "User's pickup street 1. Only required if pickup_address_same_as_billing_address is false"
    },
    "billing_address_country_iso2": {
      "type": "string",
      "example": "US",
      "maxLength": 2,
      "minLength": 2
    },
    "pickup_address_same_as_billing_address": {
      "type": "boolean",
      "example": false
    }
  }
}
object UserParcelTemplate
{
  "allOf": [
    {
      "$ref": "#/components/schemas/UserParcelTemplateBase"
    },
    {
      "title": "The fields of a parcel template before saving it to the db.",
      "properties": {
        "template": {
          "$ref": "#/components/schemas/CarrierParcelTemplate"
        },
        "object_id": {
          "type": "string",
          "example": "b958d3690bb04bb8b2986724872750f5",
          "description": "Unique identifier of the given User Parcel Template object"
        },
        "object_owner": {
          "type": "string",
          "example": "shippotle@shippo.com",
          "description": "Username of the user who created the User Parcel Template object"
        },
        "object_created": {
          "type": "string",
          "format": "date-time",
          "example": "2013-12-11T19:38:09.729Z",
          "description": "Date and time of User Parcel Template creation"
        },
        "object_updated": {
          "type": "string",
          "format": "date-time",
          "example": "2013-12-12T19:38:09.729Z",
          "description": "Date and time of last update on User Parcel Template"
        }
      }
    }
  ]
}
object UserParcelTemplateBase
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "example": "My Custom Template",
      "description": "The name of the User Parcel Template"
    },
    "width": {
      "type": "string",
      "example": "8",
      "description": "The width of the package, in units specified by the `distance_unit` attribute. Required, but if using a preset carrier template then this field must be empty."
    },
    "height": {
      "type": "string",
      "example": "6",
      "description": "The height of the package, in units specified by the `distance_unit` attribute. Required, but if using a preset carrier template then this field must be empty."
    },
    "length": {
      "type": "string",
      "example": "10",
      "description": "The length of the package, in units specified by the `distance_unit` attribute. Required, but if using a preset carrier template then this field must be empty."
    },
    "weight": {
      "type": "string",
      "example": "12",
      "description": "The weight of the package, in units specified by the weight_unit attribute."
    },
    "weight_unit": {
      "$ref": "#/components/schemas/WeightUnitEnum"
    },
    "distance_unit": {
      "$ref": "#/components/schemas/DistanceUnitEnum",
      "description": "The measure unit used for length, width and height. Required, but if using a preset carrier template then this field must be empty."
    }
  }
}
object UserParcelTemplateCreateRequest
{
  "oneOf": [
    {
      "$ref": "#/components/schemas/UserParcelTemplateWithCarrierTemplateCreateRequest"
    },
    {
      "$ref": "#/components/schemas/UserParcelTemplateWithoutCarrierTemplateCreateRequest"
    }
  ]
}
object UserParcelTemplateUpdateRequest
{
  "allOf": [
    {
      "$ref": "#/components/schemas/UserParcelTemplateBase"
    },
    {
      "required": [
        "name",
        "length",
        "width",
        "height",
        "distance_unit"
      ]
    }
  ]
}
object UserParcelTemplateWithCarrierTemplateCreateRequest
{
  "type": "object",
  "title": "A request to create or update a new parcel template.",
  "properties": {
    "weight": {
      "type": "string",
      "example": "12",
      "description": "The weight of the package, in units specified by the weight_unit attribute."
    },
    "template": {
      "type": "string",
      "description": "The object representing the carrier parcel template"
    },
    "weight_unit": {
      "$ref": "#/components/schemas/WeightUnitEnum"
    }
  }
}
object UserParcelTemplateWithoutCarrierTemplateCreateRequest
{
  "allOf": [
    {
      "$ref": "#/components/schemas/UserParcelTemplateBase"
    },
    {
      "title": "A request to create or update a new parcel template.",
      "required": [
        "name",
        "length",
        "width",
        "height",
        "distance_unit"
      ]
    }
  ]
}
array UserParcelTemplatesListAllResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/UserParcelTemplate"
  }
}
string WeightUnitEnum
{
  "enum": [
    "g",
    "kg",
    "lb",
    "oz"
  ],
  "type": "string",
  "example": "lb",
  "description": "The unit used for weight."
}