> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.xero.accounting.GetPurchaseOrder

- Component: `appmixer.xero.accounting.GetPurchaseOrder`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.xero 2.3.0](https://connectors.appmixer.com/connector/appmixer.xero/2.3.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.xero/2.3.0/component/appmixer.xero.accounting.GetPurchaseOrder>

Retrieve a single purchase order by ID.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Tenant ID (`tenantId`) | text | - |
| Purchase Order ID (`PurchaseOrderID`) | text | The unique identifier of the purchase order to retrieve. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Purchase Order ID (`PurchaseOrderID`) | string | - |
| Purchase Order Number (`PurchaseOrderNumber`) | string | - |
| `Reference` | string | - |
| `Type` | string | - |
| `Status` | string | - |
| `Contact` | object | - |
| `Date` | string | - |
| Date String (`DateString`) | string | - |
| Delivery Date (`DeliveryDate`) | string | - |
| Delivery Date String (`DeliveryDateString`) | string | - |
| Line Amount Types (`LineAmountTypes`) | string | - |
| Line Items (`LineItems`) | array | - |
| Sub Total (`SubTotal`) | number | - |
| Total Tax (`TotalTax`) | number | - |
| `Total` | number | - |
| Total Discount (`TotalDiscount`) | number | - |
| Currency Code (`CurrencyCode`) | string | - |
| Currency Rate (`CurrencyRate`) | number | - |
| Updated Date UTC (`UpdatedDateUTC`) | string | - |
| Has Attachments (`HasAttachments`) | boolean | - |
| Has Errors (`HasErrors`) | boolean | - |
| Is Discounted (`IsDiscounted`) | boolean | - |
| Branding Theme ID (`BrandingThemeID`) | string | - |
| `Url` | string | - |
| Sent To Contact (`SentToContact`) | boolean | - |
| Delivery Address (`DeliveryAddress`) | string | - |
| Attention To (`AttentionTo`) | string | - |
| `Telephone` | string | - |
| Delivery Instructions (`DeliveryInstructions`) | string | - |
| Expected Arrival Date (`ExpectedArrivalDate`) | string | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.xero.accounting.GetPurchaseOrder",
  "author": "Appmixer <info@appmixer.com>",
  "description": "Retrieve a single purchase order by ID.",
  "private": false,
  "version": "1.0.0",
  "auth": {
    "service": "appmixer:xero",
    "scope": [
      "accounting.invoices.read"
    ]
  },
  "quota": {
    "manager": "appmixer:xero:accounting",
    "resources": "requests",
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string"
          },
          "PurchaseOrderID": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "tenantId",
          "PurchaseOrderID"
        ]
      },
      "inspector": {
        "inputs": {
          "tenantId": {
            "type": "text",
            "label": "Tenant ID",
            "index": 1,
            "source": {
              "url": "/component/appmixer/xero/accounting/ListTenants?outPort=tenants",
              "data": {
                "transform": "./transformers#tenantsToSelectArray"
              }
            }
          },
          "PurchaseOrderID": {
            "type": "text",
            "label": "Purchase Order ID",
            "tooltip": "The unique identifier of the purchase order to retrieve.",
            "index": 2
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "options": [
        {
          "label": "Purchase Order ID",
          "value": "PurchaseOrderID",
          "schema": {
            "type": "string",
            "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
          }
        },
        {
          "label": "Purchase Order Number",
          "value": "PurchaseOrderNumber",
          "schema": {
            "type": "string",
            "example": "PO-0001"
          }
        },
        {
          "label": "Reference",
          "value": "Reference",
          "schema": {
            "type": "string",
            "example": "PO-REF-001"
          }
        },
        {
          "label": "Type",
          "value": "Type",
          "schema": {
            "type": "string",
            "example": "PURCHASEORDER"
          }
        },
        {
          "label": "Status",
          "value": "Status",
          "schema": {
            "type": "string",
            "example": "DRAFT"
          }
        },
        {
          "label": "Contact",
          "value": "Contact",
          "schema": {
            "type": "object",
            "example": {
              "ContactID": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
              "Name": "Acme Corp"
            }
          }
        },
        {
          "label": "Date",
          "value": "Date",
          "schema": {
            "type": "string",
            "example": "/Date(1704067200000+0000)/"
          }
        },
        {
          "label": "Date String",
          "value": "DateString",
          "schema": {
            "type": "string",
            "example": "2026-01-15"
          }
        },
        {
          "label": "Delivery Date",
          "value": "DeliveryDate",
          "schema": {
            "type": "string",
            "example": "/Date(1704067200000+0000)/"
          }
        },
        {
          "label": "Delivery Date String",
          "value": "DeliveryDateString",
          "schema": {
            "type": "string",
            "example": "2026-01-15"
          }
        },
        {
          "label": "Line Amount Types",
          "value": "LineAmountTypes",
          "schema": {
            "type": "string",
            "example": "Exclusive"
          }
        },
        {
          "label": "Line Items",
          "value": "LineItems",
          "schema": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "Description": {
                  "type": "string",
                  "title": "Description"
                },
                "UnitAmount": {
                  "type": "number",
                  "title": "UnitAmount"
                },
                "Quantity": {
                  "type": "number",
                  "title": "Quantity"
                },
                "LineAmount": {
                  "type": "number",
                  "title": "LineAmount"
                },
                "TaxAmount": {
                  "type": "number",
                  "title": "TaxAmount"
                },
                "TaxType": {
                  "type": "string",
                  "title": "TaxType"
                },
                "AccountCode": {
                  "type": "string",
                  "title": "AccountCode"
                },
                "ItemCode": {
                  "type": "string",
                  "title": "ItemCode"
                },
                "LineItemID": {
                  "type": "string",
                  "title": "LineItemID"
                },
                "DiscountRate": {
                  "type": "number",
                  "title": "DiscountRate"
                }
              }
            },
            "example": [
              {
                "Description": "Office supplies",
                "Quantity": 10,
                "UnitAmount": 5
              }
            ]
          }
        },
        {
          "label": "Sub Total",
          "value": "SubTotal",
          "schema": {
            "type": "number",
            "example": 1000
          }
        },
        {
          "label": "Total Tax",
          "value": "TotalTax",
          "schema": {
            "type": "number",
            "example": 100
          }
        },
        {
          "label": "Total",
          "value": "Total",
          "schema": {
            "type": "number",
            "example": 1100
          }
        },
        {
          "label": "Total Discount",
          "value": "TotalDiscount",
          "schema": {
            "type": "number",
            "example": 50
          }
        },
        {
          "label": "Currency Code",
          "value": "CurrencyCode",
          "schema": {
            "type": "string",
            "example": "USD"
          }
        },
        {
          "label": "Currency Rate",
          "value": "CurrencyRate",
          "schema": {
            "type": "number",
            "example": 1
          }
        },
        {
          "label": "Updated Date UTC",
          "value": "UpdatedDateUTC",
          "schema": {
            "type": "string",
            "example": "2026-01-15T10:30:00Z"
          }
        },
        {
          "label": "Has Attachments",
          "value": "HasAttachments",
          "schema": {
            "type": "boolean",
            "example": false
          }
        },
        {
          "label": "Has Errors",
          "value": "HasErrors",
          "schema": {
            "type": "boolean",
            "example": false
          }
        },
        {
          "label": "Is Discounted",
          "value": "IsDiscounted",
          "schema": {
            "type": "boolean",
            "example": false
          }
        },
        {
          "label": "Branding Theme ID",
          "value": "BrandingThemeID",
          "schema": {
            "type": "string",
            "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
          }
        },
        {
          "label": "Url",
          "value": "Url",
          "schema": {
            "type": "string",
            "example": "https://example.com/po/1"
          }
        },
        {
          "label": "Sent To Contact",
          "value": "SentToContact",
          "schema": {
            "type": "boolean",
            "example": false
          }
        },
        {
          "label": "Delivery Address",
          "value": "DeliveryAddress",
          "schema": {
            "type": "string",
            "example": "123 Main St, Springfield"
          }
        },
        {
          "label": "Attention To",
          "value": "AttentionTo",
          "schema": {
            "type": "string",
            "example": "John Smith"
          }
        },
        {
          "label": "Telephone",
          "value": "Telephone",
          "schema": {
            "type": "string",
            "example": "+1-555-0100"
          }
        },
        {
          "label": "Delivery Instructions",
          "value": "DeliveryInstructions",
          "schema": {
            "type": "string",
            "example": "Leave at reception"
          }
        },
        {
          "label": "Expected Arrival Date",
          "value": "ExpectedArrivalDate",
          "schema": {
            "type": "string",
            "example": "2026-01-20"
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
