### Overview

In order to retrieve metadata of a purchase order, you must:

- Be authenticated user

Information on how you can authenticate: [Authentication](https://developer.sellercloud.com/dev-article/authentication/)

As soon as you do authentication and receive a valid token, it needs to be passed on the call for receiving a single purchase order.

- Have valid ID of an existing purchase order.

### Endpoint

Example for such endpoint for **TT** server is [https://tt.api.sellercloud.com/rest/api/PurchaseOrders/{id}](https://tt.api.sellercloud.com/rest/api/PurchaseOrders/%7Bid%7D)

### Request

- Method Type: **HttpGet**
- Authorization: Use **Bearer Token** \+ token received from token authentication
- Header info: **Content-Type: application/json**
- Parameters: ID of the purchase order

|     |     |     |     |
| --- | --- | --- | --- |
| Parameter | Data Type | Description | Is Required |
| id | integer | ID of existing purchase order | true |

Example: [https://tt.api.sellercloud.com/rest/api/PurchaseOrders/11](https://tt.api.sellercloud.com/rest/api/PurchaseOrders/11)

### Response

- If user is authenticated and provides a valid ID of an order, then response will be **Status Code 200 => OK** and purchase order metadata in JSON format
- If user is not authenticated, then response will be **Status Code 401 => Not Valid Token**
- On server response => **Status Code 500 => Internal Server Error**

### Response Body Format

{
      "Purchase": {
        "POId": 0,
        "CompanyId": 0,
        "VendorId": 0,
        "OrderedOn": "2024-06-03T09:24:01.353Z",
        "RequestedOn": "2024-06-03T09:24:01.353Z",
        "OrderType": 0,
        "OrderTypeEnable": true,
        "POType": 0,
        "Description": "string",
        "DefaultWarehouseID": 0,
        "ExpectedDelivery": "2024-06-03T09:24:01.353Z",
        "RequireExpectedDeliveryDate": true,
        "CancelByDate": "2024-06-03T09:24:01.353Z",
        "CreditMemoID": 0,
        "CurrencyCode": 0,
        "CurrencyRateToUSD": 0,
        "CurrencyRateFromUSD": 0,
        "ReceivingStatus": 0,
        "RelatedFbaId": 0,
        "Instructions": "string",
        "IsQBExported": true,
        "IsWarehouseBinsEnabled": true,
        "CancelledPOID": 0,
        "RelatedWfsShipmentId": 0,
        "TotalCBM": 0,
        "TotalWeight": "string",
        "RelatedPOFBAPlanningId": 0,
        "ShipToAddress": {
          "ClientID": 0,
          "UserID": 0,
          "HomePhoneExt": "string",
          "PhoneNumberExt": "string",
          "IsShippingAddress": true,
          "IsBillingAddress": true,
          "AddressClassification": 0,
          "Notes": "string",
          "HomePhone": "string",
          "EmailAddress": "string",
          "AddressStatus": 0,
          "AddressSource": 0,
          "ID": 0,
          "FirstName": "string",
          "MiddleInitial": "string",
          "LastName": "string",
          "CompanyName": "string",
          "StreetLine1": "string",
          "StreetLine2": "string",
          "City": "string",
          "StateName": "string",
          "StateCode": "string",
          "PostalCode": "string",
          "CountryName": "string",
          "CountryCode": "string",
          "PhoneNumber": "string",
          "FaxNumber": "string",
          "WebSiteURL": "string"
        },
        "IsModified": true
      },
      "VendorAndInvoice": {
        "PaymentTermID": 0,
        "InvoiceNumber": "string",
        "InvoiceDate": "2024-06-03T09:24:01.353Z",
        "VendorInvoice": {
          "FileName": "string",
          "NewFileToken": "string",
          "DeleteFile": true
        },
        "Memo": "string",
        "InvoiceLineCount": "string",
        "InvoiceLink": "string",
        "EnableVendorInvoicesWorkflow": true,
        "EnableMultipleinvoicesforpurchaseorders": true,
        "PaymentStatus": 10,
        "Balance": 0,
        "TotalPaid": 0,
        "TotalRefunded": 0,
        "OverRecived": 0,
        "Invoices": [
          {
            "InvoiceDate": "2024-06-03T09:24:01.353Z",
            "InvoiceNumber": "string"
          }
        ],
        "IsModified": true
      },
      "Changes": {
        "CreatedBy": "string",
        "CreatedByEmployeeId": 0,
        "CreatedOn": "2024-06-03T09:24:01.353Z",
        "UpdatedBy": "string",
        "UpdatedByEmployeeId": 0,
        "UpdatedOn": "2024-06-03T09:24:01.353Z",
        "ApprovedBy": "string",
        "ApprovedByEmployeeId": 0,
        "ApprovedOn": "2024-06-03T09:24:01.353Z",
        "ReceivedBy": "string",
        "ReceivedByEmployeeId": 0,
        "ReceivedOn": "2024-06-03T09:24:01.353Z"
      },
      "Items": [
        {
          "ID": 0,
          "PurchaseID": 0,
          "ProductID": "string",
          "ASIN": "string",
          "ASINUrl": "string",
          "UPC": "string",
          "IsKit": true,
          "KitRefreshVisible": true,
          "KitDefinitionChanged": true,
          "ImageURL": "string",
          "VendorSKU": "string",
          "IsVendorSKUEditable": true,
          "ProductName": "string",
          "ProductNameFromProductTable": "string",
          "QtyOrdered": 0,
          "QtyReceived": 0,
          "QtyOnHand": 0,
          "QtyInContainer": 0,
          "FBAAllocationQty": 0,
          "UnitPrice": 0,
          "AdjustedPrice": 0,
          "AdjustedPriceAfterMultiDiscount": 0,
          "ExtraCostPerUnit": 0,
          "ExtraCostPOBasedPerUnit": 0,
          "DefaultWarehouseID": 0,
          "DefaultWarehouseBinID": 0,
          "Total": 0,
          "FinalSubTotalVisible": true,
          "FinalSubTotal": 0,
          "MultiDiscountTotal": 0,
          "DiscountValue": 0,
          "DiscountType": 0,
          "PricePerCase": 0,
          "TotalCases": 0,
          "QtyPerCase": 0,
          "ExpectedDeliveryDate": "2024-06-03T09:24:01.353Z",
          "PreSellQuantityEnabled": true,
          "PreSellQuantity": 0,
          "LineDiscountDataContext": {
            "PoId": 0,
            "PurchaseItemId": 0,
            "AddNewDiscountEnabled": true,
            "MultiDiscounts": [
              {
                "ID": 0,
                "DiscountTypeName": "string",
                "DiscountAmountType": 0,
                "DiscountAmount": 0,
                "DiscountCalculationType": 0
              }
            ]
          },
          "POItemNotes": "string",
          "POItemNotesLocal": "string",
          "CostPerCase": 0,
          "RelatedOrderID": 0,
          "CreditMemoQtyPicked": 0,
          "CreditMemoOrderID": 0,
          "SitePrice": 0,
          "SiteCost": 0,
          "InventoryAvailableQty": 0,
          "ReceivingStatus": 0,
          "BinName": "string",
          "RowStatus": 0,
          "IsModified": true
        }
      ],
      "RelatedItems": [
        {
          "ID": 0,
          "RecordType": "string",
          "Url": "string"
        }
      ],
      "TotalInfo": {
        "DiscountTotal": 0,
        "DiscountTotalFixed": true,
        "MultiDiscountTotal": 0,
        "EnableMultiDiscountForPurchaseOrder": true,
        "SubTotal": 0,
        "FreeShipping": true,
        "ShippingTotal": 0,
        "EnableShippingTotal": true,
        "DropShipFeeTotal": 0,
        "ShippingTotalThirdParty": 0,
        "EnableShippingTotalThirdParty": true,
        "CustomsTotal": 0,
        "TaxTotal": 0,
        "OtherTotal": 0,
        "SmallOrderFee": 0,
        "CreditCardFee": 0,
        "CreditCardFeePercent": 0,
        "GrandTotal": 0,
        "UnreceivedTotal": 0,
        "TotalUnpaid": 0,
        "EnableFreeShippingForPurchaseOrders": true,
        "EditFreeShippingForPurchaseOrders": true,
        "EditShippingTotal": true,
        "EnableOrderDropShipFee": true,
        "PurchaseOrdersEnableCustomsTotalField": true,
        "SmallOrderFeeVisible": true,
        "EnableCreditCardFeeOnPurchaseOrders": true,
        "HidePrices": true,
        "DoNotIncludeThirdPartyShippingInPOGrandTotal": true,
        "UseFixedDiscountTotal": true,
        "UseDiscountTotal": true,
        "EnableVendorInvoicesWorkflow": true,
        "IsFullyRecivedandshipped": true,
        "IsModified": true
      },
      "CustomColumns": [
        {
          "ID": 0,
          "DataType": 0,
          "DataLength": 0,
          "IsDropDownColumn": true,
          "IsDropDownCustomTextAllowed": true,
          "IsDropDownAllowMultipleSelection": true,
          "ClientID": 0,
          "NewValue": {},
          "AllowHTMLPopup": true,
          "DataSourceContainer": [
            {
              "Key": "string",
              "Value": "string",
              "Additional": {}
            }
          ],
          "IsRequired": true,
          "IsEnabledForClient": true,
          "DataTypeName": "string",
          "ColumnName": "string",
          "DisplayName": "string",
          "Value": {}
        }
      ],
      "Metadata": {
        "PurchaseOrderCurrencyDigitsCount": 0,
        "EnableCaseQty": true,
        "EnabledMultipleDiscounts": true,
        "FixedTotalDiscount": true,
        "EnablePerCaseQtyModeSetting": true,
        "EnableVendorInvoicesWorkflow": true,
        "AllowToIgnoreInventoryInPurchaseOrder": true,
        "EnableShippingContainers": true,
        "EnablePOFBAAllocationQty": true,
        "EnableNotesForPurchaseItems": true,
        "EnableLocalNotesForPurchaseItems": true,
        "EnableCurrencySymbolForPO": true,
        "ShowASINAndUPCInPoItems": true,
        "ShowQtyOnHandInPoItems": true,
        "EnableExpectedDeliveryForPurchaseItems": true,
        "BreakupKitComponentsWhenAddingKitParentToPO": true
      },
      "Statuses": {
        "Status": 0,
        "IsApproved": true,
        "Priority": 0,
        "ShippingStatus": 0,
        "ReceivingStatus": 0,
        "PaymentStatus": 10,
        "InvoicedStatus": "string",
        "PickingStatus": "string",
        "InventoryCount": "string",
        "EmailSent": "string",
        "ReleaseForReceiving": true,
        "IsExported": true
      },
      "ShowProductImageForItems": true,
      "EnablePoPrSellQuantity": true,
      "NotesCount": 0,
      "IsModified": true
    }
