# Reference Types

Shared types are used where the same structure of data appears in more than one data type.\
Reference date types (ending with **Ref**) link between data types in the Railz Commerce API endpoints.

## FulfillmentRefs

Found on:

* [Orders](https://docs.railz.ai/railz/reference/commerce-orders)

| Field              | Type     | Description                                                          |
| :----------------- | :------- | :------------------------------------------------------------------- |
| **carrier**        | *string* | The shipping company.                                                |
| **trackingNumber** | *string* | Tracking number associated with the order parcel.                    |
| **service**        | *string* | The shipping service e.g. priority mail, 2 day delivery, etc.        |
| **trackingUrl**    | *string* | The tracking URL that the buyer can click to check tracking details. |

## RefundRefs

Found on:

* [Orders](https://docs.railz.ai/railz/reference/commerce-orders)

| Field           | Type      | Description                                  |
| :-------------- | :-------- | :------------------------------------------- |
| **id**          | *string*  | Unique Identifier of the refund transaction. |
| **totalAmount** | *decimal* | The total amount to be refunded.             |

## TransactionSourceRefs

Found on:

* [Orders](https://docs.railz.ai/railz/reference/commerce-orders)
* [Transactions](https://docs.railz.ai/railz/reference/commerce-transactions)

[block:parameters]
{
  "data": {
    "h-0": "Field",
    "h-1": "Type",
    "h-2": "Description",
    "0-0": "**id**",
    "0-1": "_string_",
    "0-2": "Unique Identifier of the source transaction",
    "1-0": "**type**",
    "1-1": "_string_",
    "1-2": "Type of the transaction:  \nfailedPayout  \npayment  \npaymentFee  \npaymentFeeRefund  \npayout  \nrefund  \ntransfer  \ndispute  \norder  \nother  \nunknown",
    "2-0": "**totalAmount**",
    "2-1": "_decimal_",
    "2-2": "Total amount of the transaction."
  },
  "cols": 3,
  "rows": 3,
  "align": [
    "left",
    "left",
    "left"
  ]
}
[/block]

## CustomerRef

Found on:

* [Orders](https://docs.railz.ai/railz/reference/commerce-orders)

| Field            | Type     | Description                                                                      |
| :--------------- | :------- | :------------------------------------------------------------------------------- |
| **id**           | *string* | Identifier for the customer, unique to the business in the commerce platform.    |
| **customerName** | *string* | First Name +' '+ Last Name of the customer as recorded in the commerce platform. |
| **email**        | *string* | Customer’s primary email address.                                                |

## CurrencyRef

Found on:

* [Orders](https://docs.railz.ai/railz/reference/commerce-orders)
* [Transactions](https://docs.railz.ai/railz/reference/commerce-transactions)
* [Disputes](https://docs.railz.ai/railz/reference/commerce-disputes)

| Field      | Type     | Description                                                                                                                  |
| :--------- | :------- | :--------------------------------------------------------------------------------------------------------------------------- |
| **id**     | *string* | Identifier for the currency, unique to the business in the commerce platform. Can be similar to `symbol` for some providers. |
| **symbol** | *string* | A three letter string representing the ISO-4217 code for the currency.                                                       |
| **name**   | *string* | Full name of the currency e.g. Canadian Dollars                                                                              |

## Address

Found on:

* [Orders](https://docs.railz.ai/railz/reference/commerce-orders)

| Field           | Type     | Description                                                 |
| :-------------- | :------- | :---------------------------------------------------------- |
| **contactName** | *string* | The name of the contact person associated with the address. |
| **phone**       | *string* | The phone number at the address.                            |
| **line1**       | *string* | Line 1 of the address.                                      |
| **line2**       | *string* | Line 2 of the address.                                      |
| **city**        | *string* | City of the address.                                        |
| **region**      | *string* | Region of the address.                                      |
| **country**     | *string* | Country of the address as 3 ISO alpha-3 characters.         |
| **postalCode**  | *string* | Postal code or zip code of the address.                     |

## LocationRef

Found on:

* [Products](https://docs.railz.ai/railz/reference/commerce-products)

| Field    | Type     | Description                                                       |
| :------- | :------- | :---------------------------------------------------------------- |
| **id**   | *string* | id' unique to the product or order - from the Locations data type |
| **name** | *string* | name' from the Locations data type                                |