POST v1/purchase-orders/search

Search for purchase order using the search filters passed in request body

Request Information

URI Parameters

None.

Body Parameters

All available search parameters

PurchaseOrderSearchParameters
NameDescriptionTypeAdditional information
PONumber

string

None.

POName

string

None.

VendorId

integer

None.

DateCreatedFrom

The date and time (in company time zone) when the purchase order was created.

date

None.

DateCreatedTo

The date and time (in company time zone) when the purchase order was created.

date

None.

StatusChangedTo

integer

None.

StatusChangedDateFrom

The date and time (in company time zone) when the purchase order status was changed.

date

None.

StatusChangedDateTo

The date and time (in company time zone) when the purchase order status was changed.

date

None.

LastUpdatedDateFrom

The date and time (in company time zone) when the purchase order was last updated.

date

None.

LastUpdatedDateTo

The date and time (in company time zone) when the purchase order was last updated.

date

None.

PageIndex

zero-based page number

integer

None.

PageSize

Default value is 100

integer

Range: inclusive between 1 and 1000

SortExpression

Specify the field name to sort the result set by. It can be one of the fields returned by the search.

string

None.

SortOrder

Specify Sort Order. Ascending=1, Descending=2. Default value is 1 (Ascending)

integer

Range: inclusive between 1 and 2

Request Formats

application/json, text/json

Sample:
{
  "poNumber": "sample string 1",
  "poName": "sample string 2",
  "vendorId": 1,
  "dateCreatedFrom": "2022-07-01T16:50:58.8358295-04:00",
  "dateCreatedTo": "2022-07-01T16:50:58.8358295-04:00",
  "statusChangedTo": 1,
  "statusChangedDateFrom": "2022-07-01T16:50:58.8358295-04:00",
  "statusChangedDateTo": "2022-07-01T16:50:58.8358295-04:00",
  "lastUpdatedDateFrom": "2022-07-01T16:50:58.8358295-04:00",
  "lastUpdatedDateTo": "2022-07-01T16:50:58.8358295-04:00",
  "pageIndex": 3,
  "pageSize": 4,
  "sortExpression": "sample string 5",
  "sortOrder": 6
}

application/xml, text/xml

Sample:
<PurchaseOrderSearchParameters xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models.PO">
  <PageIndex xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models">3</PageIndex>
  <PageSize xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models">4</PageSize>
  <SortExpression xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models">sample string 5</SortExpression>
  <SortOrder xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models">6</SortOrder>
  <DateCreatedFrom>2022-07-01T16:50:58.8358295-04:00</DateCreatedFrom>
  <DateCreatedTo>2022-07-01T16:50:58.8358295-04:00</DateCreatedTo>
  <LastUpdatedDateFrom>2022-07-01T16:50:58.8358295-04:00</LastUpdatedDateFrom>
  <LastUpdatedDateTo>2022-07-01T16:50:58.8358295-04:00</LastUpdatedDateTo>
  <POName>sample string 2</POName>
  <PONumber>sample string 1</PONumber>
  <StatusChangedDateFrom>2022-07-01T16:50:58.8358295-04:00</StatusChangedDateFrom>
  <StatusChangedDateTo>2022-07-01T16:50:58.8358295-04:00</StatusChangedDateTo>
  <StatusChangedTo>1</StatusChangedTo>
  <VendorId>1</VendorId>
</PurchaseOrderSearchParameters>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

SearchResultOfPurchaseOrderSearchResult
NameDescriptionTypeAdditional information
TotalCount

integer

None.

Data

Collection of PurchaseOrderSearchResult

None.

Response Formats

application/json, text/json

Sample:
{
  "totalCount": 1,
  "data": [
    {
      "id": 1,
      "poNumber": "sample string 2",
      "poName": "sample string 3",
      "vendorId": 4,
      "vendor": {
        "id": 1,
        "name": "sample string 2"
      },
      "poTotal": 5.0,
      "dateCreated": "2022-07-01T16:50:58.8514404-04:00",
      "lastUpdatedDate": "2022-07-01T16:50:58.8514404-04:00",
      "currency": {
        "currencyISOCode": "sample string 1",
        "exchangeRate": 2.0
      }
    },
    {
      "id": 1,
      "poNumber": "sample string 2",
      "poName": "sample string 3",
      "vendorId": 4,
      "vendor": {
        "id": 1,
        "name": "sample string 2"
      },
      "poTotal": 5.0,
      "dateCreated": "2022-07-01T16:50:58.8514404-04:00",
      "lastUpdatedDate": "2022-07-01T16:50:58.8514404-04:00",
      "currency": {
        "currencyISOCode": "sample string 1",
        "exchangeRate": 2.0
      }
    }
  ]
}

application/xml, text/xml

Sample:
<SearchResultOfPurchaseOrderSearchResultYiAtvSr1 xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models">
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/BAPI.Models.PO">
    <d2p1:PurchaseOrderSearchResult>
      <d2p1:Currency xmlns:d4p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
        <d4p1:_x003C_CurrencyISOCode_x003E_k__BackingField>sample string 1</d4p1:_x003C_CurrencyISOCode_x003E_k__BackingField>
        <d4p1:_x003C_ExchangeRate_x003E_k__BackingField>2</d4p1:_x003C_ExchangeRate_x003E_k__BackingField>
      </d2p1:Currency>
      <d2p1:DateCreated>2022-07-01T16:50:58.8514404-04:00</d2p1:DateCreated>
      <d2p1:Id>1</d2p1:Id>
      <d2p1:LastUpdatedDate>2022-07-01T16:50:58.8514404-04:00</d2p1:LastUpdatedDate>
      <d2p1:POName>sample string 3</d2p1:POName>
      <d2p1:PONumber>sample string 2</d2p1:PONumber>
      <d2p1:POTotal>5</d2p1:POTotal>
      <d2p1:Vendor xmlns:d4p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
        <d4p1:_x003C_Id_x003E_k__BackingField>1</d4p1:_x003C_Id_x003E_k__BackingField>
        <d4p1:_x003C_Name_x003E_k__BackingField>sample string 2</d4p1:_x003C_Name_x003E_k__BackingField>
      </d2p1:Vendor>
      <d2p1:VendorId>4</d2p1:VendorId>
    </d2p1:PurchaseOrderSearchResult>
    <d2p1:PurchaseOrderSearchResult>
      <d2p1:Currency xmlns:d4p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
        <d4p1:_x003C_CurrencyISOCode_x003E_k__BackingField>sample string 1</d4p1:_x003C_CurrencyISOCode_x003E_k__BackingField>
        <d4p1:_x003C_ExchangeRate_x003E_k__BackingField>2</d4p1:_x003C_ExchangeRate_x003E_k__BackingField>
      </d2p1:Currency>
      <d2p1:DateCreated>2022-07-01T16:50:58.8514404-04:00</d2p1:DateCreated>
      <d2p1:Id>1</d2p1:Id>
      <d2p1:LastUpdatedDate>2022-07-01T16:50:58.8514404-04:00</d2p1:LastUpdatedDate>
      <d2p1:POName>sample string 3</d2p1:POName>
      <d2p1:PONumber>sample string 2</d2p1:PONumber>
      <d2p1:POTotal>5</d2p1:POTotal>
      <d2p1:Vendor xmlns:d4p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
        <d4p1:_x003C_Id_x003E_k__BackingField>1</d4p1:_x003C_Id_x003E_k__BackingField>
        <d4p1:_x003C_Name_x003E_k__BackingField>sample string 2</d4p1:_x003C_Name_x003E_k__BackingField>
      </d2p1:Vendor>
      <d2p1:VendorId>4</d2p1:VendorId>
    </d2p1:PurchaseOrderSearchResult>
  </Data>
  <TotalCount>1</TotalCount>
</SearchResultOfPurchaseOrderSearchResultYiAtvSr1>