Purchase Orders

The following services are included in this functional area:

Mobile Workflow Purchase Order Download Service

The following services are included in this functional area:

Create Purchase Order - Get Items for Purchase Orders

This section describes the Search Items service.

Business Overview

This service retrieves items applicable for Purchase Order. Item can be searched by either Item or VPN. Enter an item number, a partial item description, or a VPN in the search string.

  1. When search type is ITEM, the search string can be an item number, a partial item number, an item description, or partial item description

  2. When search type is VPN, the search string can be a VPN or partial VPN.

The items returned are constrained by the following criteria:

  • Approved status.

  • Transaction-level items.

  • Orderable items.

  • Pack items with Order Type as Each are filtered out.

  • Only items belonging to Normal Merchandise Purchase Type as Department are retuned.

  • When a supplier is sent as input then:

    • Only items supplied by the input supplier are returned.

    • The item information is based on the Item/Supplier/Primary Origin Country.

  • When supplier is not sent as input, then item information is based on the primary supplier and primary origin country.

  • If the system_options.dept_level_orders is set to"Y" and the Department ID is sent as input, then only the input department items are returned.

  • Items set for deletion are filtered out.

Service Type

Get

ReST URL
/PurchaseOrders/item?itemSearchType={itemSearchType}&searchString={searchString}&dept={dept}&supplier={supplier}&locations={locations}&pageSize={pageSize}&pageNumber={pageNumber}
Input Parameters
Parameter Name Required Description Valid values

itemSearchType

Yes

Search Type item or VPN.

ITEM, VPN

searchString

Yes

Search string for items Id or Name.

NA

dept

No

Selected items' department ID.

NA

supplier

No

Selected Supplier ID.

NA

Locations

No

Comma Separated values for selected locations' ID.

NA

PageSize

No

Maximum number of items to retrieve per page.

NA

PageNumber

No

Result page to retrieve.

NA

Output

PoItemSearchResultRDO

Parameter Name Data Type

item

String

itemDesc

String

supplier

BigDecimal

originCountry

String

suppPackSize

BigDecimal

unitCost

BigDecimal

supplierCurrency

String

baseUnitRetail

BigDecimal

retailCurrency

String

baseRetailUnitOfMeasure

String

itemImageUrl

String

dept

BigDecimal

itemSearchLocRDO

List<PoItemSearchRstLocRDO>

PoItemSearchRstLocRDO

Parameter Name Data Type

location

BigDecimal

locationType

String

unitRetail

BigDecimal

retailCurrency

String

unitRetailUnitOfMeasure

String

itemLocStatus

String

PagedResultsRDO

Parameter Name Data Type

totalRecordCount

BigDecimal

Next Page URL

String

Previous Page URL

String

JSON Structure

{
  "links": [],
  "totalRecordCount": 1,
  "results": [
    {
      "links": [],
      "item": "100001887",
      "itemDesc": "DIT Test 12:Black:Medium",
      "supplier": 2200,
      "originCountry": "US",
      "suppPackSize": 1,
      "unitCost": 5,
      "supplierCurrency": "USD",
      "baseUnitRetail": 7.26,
      "retailCurrency": "USD",
      "baseRetailUnitOfMeasure": "EA",
      "itemImageUrl": null,
      "dept": 1102,
      "itemSearchLocRDO": [
        {
          "links": [],
          "location": 363640301,
          "locationType": "W",
          "unitRetail": 7.26,
          "retailCurrency": "USD",
          "unitRetailUnitOfMeasure": "CKG",
          "itemLocStatus": "A",
          "hyperMediaContent": {
            "linkRDO": []
          }
        }
      ],
      "hyperMediaContent": {
        "linkRDO": []
      }
    }
  ],
  "hyperMediaContent": {
    "linkRDO": []
  }
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

DAILY_PURGE

Yes

No

No

No

DEPS

Yes

No

No

No

ITEM_LOC

Yes

No

No

No

ITEM_IMAGE

Yes

No

No

No

ITEM_MASTER

Yes

No

No

No

ITEM_SUPPLIER

Yes

No

No

No

ITEM_SUPP_COUNTRY

Yes

No

No

No

MV_CURRENCY_CONVERSION_RATES

Yes

No

No

No

RPM_MERCH_RETAIL_DEF_EXPL

Yes

No

No

No

RPM_ZONE

Yes

No

No

No

V_ITEM_MASTER

Yes

No

No

No

V_PACKSKU_QTY

Yes

No

No

No

V_SUPS

Yes

No

No

No

WH

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Create Purchase Order - Get Locations for Purchase Order

This section describes the Search Location service.

Business Overview

The Web service enables location search applicable for PO. Location can be searched by either 'S'tore or 'W'arehouse. Enter a location number, a partial location number, a location description, or a partial location description in the search string.

The locations returned are constrained by the following criteria:

  • Only stockholding locations are returned.

  • When search type is Warehouse then:

    • Only virtual warehouses are returned.

    • Internal finishers are filtered out.

  • When search type is store then only the following stores are returned:

    • Company stores.

    • Open stores.

  • When system_options.org_unit_ind is set as 'Y' then:

    • When supplier is sent as input then only locations with same org_unit_id are returned.

    • When Org Unit ID is sent as input then only locations with same org_unit_id are returned.

Service Type

Get

ReST URL
/PurchaseOrders/location?locationType={locationType}&searchString={searchString}&supplier={supplier}&orgUnitId={orgUnitId}&pageSize={pageSize}&pageNumber={pageNumber}
Input Parameters
Parameter Name Required Description Valid values

LocationType

Yes

Location type Store or warehouse.

S, W

SearchString

Yes

Search string for locations Id or Name.

NA

Supplier

No

Selected Supplier ID.

NA

OrgUnitId

No

Selected locations' Org unit ID.

NA

PageSize

No

Maximum number of locations to retrieve per page.

NA

PageNumber

No

Result page to retrieve.

NA

Output

PoLocSearchResultRDO

Parameter Name Data Type

location

BigDecimal

locType

String

locName

String

locationCurrency

String

orgUnitId

BigDecimal

PagedResultsRDO

Parameter Name Data Type

totalRecordCount

BigDecimal

Next Page URL

String

Previous Page URL

String

JSON Structure

{
  "links": [
    {
      "href": "/PurchaseOrders/location?searchString=e&pageSize=1&pageNumber=2",
      "rel": "next",
      "type": "GET",
      "methodType": null
    }
  ],
  "totalRecordCount": 100,
  "results": [
    {
      "links": [],
      "location": 292919862,
      "locType": "S",
      "locName": "ALLOC_FD_Store_1_292919862",
      "locationCurrency": "USD",
      "orgUnitId": 1111111111,
      "hyperMediaContent": {
        "linkRDO": []
      }
    }
  ],
  "hyperMediaContent": {
    "linkRDO": [
      {
        "href": "/PurchaseOrders/location?searchString=e&pageSize=1&pageNumber=2",
        "rel": "next",
        "type": "GET",
        "methodType": null
      }
    ]
  }
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

PARTNER_ORG_UNIT

Yes

No

No

No

V_STORE

Yes

No

No

No

V_WH

Yes

No

No

No

WH

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Create Purchase Order - Get Next Purchase Order Numbers

Business Overview

This service retrieves next available order numbers from Merchandising. This service takes an optional query parameter of count to retrieve multiple (up to 999) order numbers. The count defaults to 1 if the query parameter is not provided.

Service Type

Get

ReST URL
/PurchaseOrders/order/id
Input Parameters
Parameter Name Required Description

count

No

Count (1-999) of order numbers to be fetched. Default value is 1.

Output
Parameter Name Data Type Details

order_no

Number

Deprecated (Use orderNumbers) as this service has been enhanced to return multiple order numbers. This field will contain the first order number from the orderNumbers list.

orderNumbers

Array

Contains the list of available order numbers.

JSON Structure

{
  "order_no": 123456,
  "orderNumbers": [123456, 123457]
}
Table Impact

N/A

Create Purchase Order - Get Purchase Order Supplier Terms

This section describes the valid terms.

Business Overview

Retrieves all valid terms; valid terms are enabled with flag set to Yes and within the start and end active date.

Service Type

Get

ReST URL
/PurchaseOrders/supplier/terms
Input Parameters

N/A

Output

PoSupTermsRDO

Parameter Name Data Type

terms

String

terms_code

String

terms_desc

String

JSON Structure

{
  "links": [],
  "terms": "108",
  "terms_code": "108",
  "terms_desc": "02 001.00% 010 000",
  "rank": null,
  "hyperMediaContent": {
    "linkRDO": []
  }
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

TERMS_HEAD

Yes

No

No

No

TERMS_DETAIL

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Create Purchase Order - Get Suppliers for Purchase Order

This section describes the Search Supplier service.

Business Overview

Supplier search can be, by entering either full or partial supplier site ID (numeric) or by a full or partial supplier site description in the search string.

Returned suppliers are constrained by the following criteria:

  • Only active supplier sites are returned.

  • When items are sent as input, then only supplier sites that are common amongst the items are returned.

  • When locations are sent as input, then only suppliers that are valid for the Org Units associated with the input locations are returned.

Service Type

Get

ReST URL
/PurchaseOrders/supplier?supplierSearchString={supplierSearchString}&locations={locations}&items={items}&pageSize={pageSize}&pageNumber={pageNumber}
Input Parameters
Parameter Name Required Description

SupplierSearchString

Yes

Search string for Supplier's ID or Name.

Item

No

Comma Separated values for items.

Locations

No

Comma Separated values for locations.

PageSize

No

Maximum number of suppliers to retrieve per page.

PageNumber

No

Result page to retrieve.

Output

PoSupSearchResultRDO

Parameter Name Data Type

supplier

BigDecimal

supplierName

String

supplierCurrency

String

terms

String

defaultItemLeadTime

BigDecimal

supplierSearchItemRDO

List<PoSupItemResultRDO>

supplierSearchItemLocRDO

List<PoSupItemLocResultRDO>

PoSupItemResultRDO

Parameter Name Data Type

item

String

originCountryId

String

leadTime

BigDecimal

PoSupItemLocResultRDO

Parameter Name Data Type

item

String

location

BigDecimal

pickupLeadTime

BigDecimal

PagedResultsRDO

Parameter Name Data Type

totalRecordCount

BigDecimal

Next Page URL

String

Previous Page URL

String

JSON Structure

{
  "links": [],
  "totalRecordCount": 1,
  "results": [
    {
      "links": [],
      "supplier": 2200,
      "supplierName": "Our Supplier",
      "supplierCurrency": "USD",
      "terms": "04",
      "defaultItemLeadTime": 2,
      "supplierSearchItemRDO": [
        {
          "links": [],
          "item": "100001887",
          "originCountryId": "US",
          "leadTime": 2,
          "hyperMediaContent": {
            "linkRDO": []
          }
        }
      ],
      "supplierSearchItemLocRDO": [
        {
          "links": [],
          "item": "100001887",
          "location": 363640301,
          "pickupLeadTime": null,
          "hyperMediaContent": {
            "linkRDO": []
          }
        }
      ],
      "hyperMediaContent": {
        "linkRDO": []
      }
    }
  ],
  "hyperMediaContent": {
    "linkRDO": []
  }
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

ITEM_SUPPLIER

Yes

No

No

No

ITEM_SUPP_COUNTRY

Yes

No

No

No

ITEM_SUPP_COUNTRY_LOC

Yes

No

No

No

STORE

Yes

No

No

No

SUPS

Yes

No

No

No

V_SUPS

Yes

No

No

No

WH

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Create Purchase Order - Refresh Purchase Order Item Locations

This section describes the Load Locations service.

Business Overview

This Web service allows the user to refresh already selected PO locations records.

Service Type

Get

ReST URL
/PurchaseOrders/location/load?locations={locations}&supplier={supplier}
Input Parameters
Parameter Name Required Description

Locations

Yes

Comma Separated values for selected locations' ID.

Supplier

No

Selected Supplier ID.

Output

PoLocSearchResultRDO

Parameter Name Data Type

location

BigDecimal

locType

String

locName

String

locationCurrency

String

orgUnitId

BigDecimal

JSON Structure

{
  "links": [],
  "location": 292919862,
  "locType": "S",
  "locName": "ALLOC_FD_Store_1_292919862",
  "locationCurrency": "USD",
  "orgUnitId": 1111111111,
  "hyperMediaContent": {
  "linkRDO": []
  }
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

PARTNER_ORG_UNIT

Yes

No

No

No

V_STORE

Yes

No

No

No

V_WH

Yes

No

No

No

WH

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Create Purchase Order - Refresh Purchase Order Items

This section describes the load items.

Business Overview

The primary use of loading items Web service is to refresh already selected PO items records.

Service Type

Get

ReST URL
/PurchaseOrders/item/load?item=item&supplier={supplier}&locations={locations}
Input Parameters
Parameter Name Required Description

Items

Yes

Comma Separated values for selected items' ID.

Supplier

No

Selected Supplier ID.

Locations

No

Comma Separated values for selected locations' ID.

Output

PoItemSearchResultRDO

Parameter Name Data Type

item

String

itemDesc

String

supplier

BigDecimal

originCountry

String

suppPackSize

BigDecimal

unitCost

BigDecimal

supplierCurrency

String

baseUnitRetail

BigDecimal

retailCurrency

String

baseRetailUnitOfMeasure

String

itemImageUrl

String

dept

BigDecimal

itemSearchLocRDO

List<PoItemSearchRstLocRDO>

PoItemSearchRstLocRDO

Parameter Name Data Type

location

BigDecimal

locationType

String

unitRetail

BigDecimal

retailCurrency

String

unitRetailUnitOfMeasure

String

itemLocStatus

String

PagedResultsRDO

Parameter Name Data Type

totalRecordCount

BigDecimal

Next Page URL

String

Previous Page URL

String

JSON Structure

{
  "links": [],
  "totalRecordCount": 1,
  "results": [
    {
      "links": [],
      "item": "100001887",
      "itemDesc": "DIT Test 12:Black:Medium",
      "supplier": 2200,
      "originCountry": "US",
      "suppPackSize": 1,
      "unitCost": 5,
      "supplierCurrency": "USD",
      "baseUnitRetail": 7.26,
      "retailCurrency": "USD",
      "baseRetailUnitOfMeasure": "EA",
      "itemImageUrl": null,
      "dept": 1102,
      "itemSearchLocRDO": [
        {
          "links": [],
          "location": 363640301,
          "locationType": "W",
          "unitRetail": 7.26,
          "retailCurrency": "USD",
          "unitRetailUnitOfMeasure": "CKG",
          "itemLocStatus": "A",
          "hyperMediaContent": {
            "linkRDO": []
          }
        }
      ],
      "hyperMediaContent": {
        "linkRDO": []
      }
    }
  ],
  "hyperMediaContent": {
    "linkRDO": []
  }
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

DAILY_PURGE

Yes

No

No

No

DEPS

Yes

No

No

No

ITEM_LOC

Yes

No

No

No

ITEM_IMAGE

Yes

No

No

No

ITEM_MASTER

Yes

No

No

No

ITEM_SUPPLIER

Yes

No

No

No

ITEM_SUPP_COUNTRY

Yes

No

No

No

MV_CURRENCY_CONVERSION_RATES

Yes

No

No

No

RPM_MERCH_RETAIL_DEF_EXPL

Yes

No

No

No

RPM_ZONE

Yes

No

No

No

V_ITEM_MASTER

Yes

No

No

No

V_PACKSKU_QTY

Yes

No

No

No

V_SUPS

Yes

No

No

No

WH

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Create Purchase Order - Refresh Purchase Order Suppliers

This section describes the load supplier service.

Business Overview

Loading supplier Web service allows a user to refresh the selected supplier records.

Service Type

Get

ReST URL
/PurchaseOrders/supplier/load?suppliers={suppliers}&locations={locations}&items={items}
Input Parameters
Parameter Name Required Description

Supplier

Yes

Supplier's ID.

Item

No

Comma Separated values for items.

Locations

No

Comma Separated values for locations.

Output

PoSupSearchResultRDO

Parameter Name Data Type

supplier

BigDecimal

supplierName

String

supplierCurrency

String

terms

String

defaultItemLeadTime

BigDecimal

supplierSearchItemRDO

List<PoSupItemResultRDO>

supplierSearchItemLocRDO

List<PoSupItemLocResultRDO>

PoSupItemResultRDO

Parameter Name Data Type

item

String

originCountryId

String

leadTime

BigDecimal

PoSupItemLocResultRDO

Parameter Name Data Type

item

String

location

BigDecimal

pickupLeadTime

BigDecimal

JSON Structure

{
  "links": [],
  "totalRecordCount": 1,
  "results": [
    {
      "links": [],
      "supplier": 2200,
      "supplierName": "Our Supplier",
      "supplierCurrency": "USD",
      "terms": "04",
      "defaultItemLeadTime": 2,
      "supplierSearchItemRDO": [
        {
          "links": [],
          "item": "100001887",
          "originCountryId": "US",
          "leadTime": 2,
          "hyperMediaContent": {
            "linkRDO": []
          }
        }
      ],
      "supplierSearchItemLocRDO": [
        {
          "links": [],
          "item": "100001887",
          "location": 363640301,
          "pickupLeadTime": null,
          "hyperMediaContent": {
            "linkRDO": []
          }
        }
      ],
      "hyperMediaContent": {
        "linkRDO": []
      }
    }
  ],
  "hyperMediaContent": {
    "linkRDO": []
  }
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

ITEM_SUPPLIER

Yes

No

No

No

ITEM_SUPP_COUNTRY

Yes

No

No

No

ITEM_SUPP_COUNTRY_LOC

Yes

No

No

No

STORE

Yes

No

No

No

SUPS

Yes

No

No

No

V_SUPS

Yes

No

No

No

WH

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Get Purchase Order Detail - Simple

This section describes the Purchase Order Detail Service.

Business Overview

Purchase Order Detail service allows user to retrieve purchase order information for a selected order.

Service Type

Get

ReST URL
Po/poDetail?orderNumber={orderNumber}
Input Parameters
Parameter Name Required Description

Order Number

Yes

Order Number

Output

RestPoRecRDO

Parameter Name Data Type

orderNumber

BigDecimal

orderType

String

group

BigDecimal

division

BigDecimal

dept

BigDecimal

buyer

BigDecimal

supplier

BigDecimal

supplierStatus

String

locationType

String

location

BigDecimal

writtenDate

Date

notBeforeDate

Date

notAfterDate

Date

otbEndofWeekDate

Date

earliestShipDate

Date

latestShipDate

Date

closeDate

Date

terms

String

freightTerms

String

originIndicator

BigDecimal

shipmentMethod

String

purchaseType

String

status

String

currencyCode

String

masterPurchaseOrderNumber

BigDecimal

poItemTbl

List<RestPoItemRecRDO>

RestPoItemRecRDO

Parameter Name Data Type

item

String

refernceItem

String

packItem

String

originCountryId

String

earliestShipDate

Date

latestShipDate

Date

supplierPackSize

BigDecimal

location

BigDecimal

locationType

String

physicalWarehouse

BigDecimal

unitRetail

BigDecimal

quantityOrdered

BigDecimal

quantityPrescaled

BigDecimal

quantityReceived

BigDecimal

lastReceivedQuantity

BigDecimal

lastRoundQuantity

BigDecimal

lastGroupRoundedQunatity

BigDecimal

quantityCancelled

BigDecimal

cancelCode

String

cancelDate

Date

unitCost

BigDecimal

costSource

String

nonScaleIndicator

String

estimatedStockDate

Date

restPoItemExpTbl

List<RestPoItemExpRecRDO>

RestPoItemExpRecRDO

Parameter Name Data Type

item

String

packItem

String

location

BigDecimal

locationType

String

componentId

String

componentDecsiption

String

alwaysDefaultIndicator

String

componentRate

BigDecimal

componentCurrency

String

exchangeRate

BigDecimal

estimatedExpenceValue

BigDecimal

JSON Structure

{
  "orderNumber": null,
  "orderType": null,
  "group": null,
  "division": null,
  "dept": null,
  "buyer": null,
  "supplier": null,
  "supplierStatus": null,
  "locationType": null,
  "location": null,
  "writtenDate": null,
  "notBeforeDate": null,
  "notAfterDate": null,
  "otbEndOfWeekDate": null,
  "earliestShipDate": null,
  "latestShipDate": null,
  "closeDate": null,
  "terms": null,
  "freightTerms": null,
  "originIndicator": null,
  "shipmentmethod": null,
  "purchaseType": null,
  "status": null,
  "currencyCode": null,
  "masterPurchaseOrderNumber": null,
  "poItemTbl": [
    {
      "item": null,
      "referenceItem": null,
      "originCountryId": null,
      "earliestShipDate": null,
      "latestShipDate": null,
      "supplierPackSize": null,
      "location": null,
      "locationType": null,
      "physicalWarehouse": null,
      "unitRetail": null,
      "quantityOrdered": null,
      "quantityPrescaled": null,
      "quantityReceived": null,
      "lastReceivedQuantity": null,
      "lastRoundQuantity": null,
      "lastGroupRoundedQuantity": null,
      "quantityCancelled": null,
      "cancelCode": null,
      "unitCost": null,
      "costSource": null,
      "nonScaleIndicator": null,
      "estimatedStockDate": null,
      "poItemExpTbl": [
         {
           "item": null,
           "packItem": null,
           "location": null,
           "locationType": null,
           "componentId": null,
           "componentDescription": null,
           "alwaysDefaultIndicator": null,
           "componentRate": null,
           "componentCurrency": null,
           "exchangeRate": null,
           "estimatedExpenceValue": null,
           "links": [],
           "hyperMediaContent": {
           "linkRDO": []
        }
      }
    ],
    "links": [],
    "hyperMediaContent": {
       "linkRDO": []
    }
  }
  "links": [],
  "hyperMediaContent": {
    "linkRDO": []
  }
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

ORDHEAD

Yes

No

No

No

ORDLOC

Yes

No

No

No

ORDSKU

Yes

No

No

No

ORDLOC_EXPENSES

Yes

No

No

No

V_DEPS

Yes

No

No

No

SUPS

Yes

No

No

No

WH

Yes

No

No

No

ELC_COMP

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Manage Purchase Orders - Get Open Purchase Orders

This section describes the Purchase Order Search service.

Functional Area

Procurement

Business Overview

This service retrieves summary information on all none closed purchase orders that match input criteria.

Service Type

Get

ReST URL
/PurchaseOrders/recent/purchaseOrderSearch?statuses={statuses}&createIds={createIds}&startCreateDate={startCreateDate}&endCreateDate={endCreateDate}&orderNumber={orderNumber}&suppliers={suppliers}&originCodes={originCodes}&departments={departments}&pageSize={pageSize}&pageNumber={pageNumber}
Input Parameters
Parameter Name Required Description Valid values

statuses

No

List of order status

A, S, W

createIds

No

List of user IDs who created the PO

startCreateDate

No

Long format date for starting period

endCreateDate

No

Long format date for end period

orderNumber

No

Order number to retrieve

suppliers

No

List of order suppliers

originCodes

No

List of valid Origin codes

departments

No

List of valid order/item departments

pageSize

Maximum number of orders to retrieve per page

pageNumber

Result page to retrieve

Output

RpoSearchResRDO

Parameter Name Data Type

orderNumber

BigDecimal

status

String

supplier

BigDecimal

supplierName

String

notBeforeDate

Long

notAfterDate

Long

totalCost

BigDecimal

currency

String

previouslyApprovedIndicator

String

editableIndicator

String

PagedResultsRDO

Parameter Name Data Type

totalRecordCount

BigDecimal

Next Page URL

String

Previous Page URL

String

JSON Structure

{
  "type": "paginationRDO",
  "totalRecordCount": 252,
  "hyperMediaContent": {},
  "links": [], 
  "results": [{
    "orderNumber": 12453253, 
    "statusId" : "W", 
    "supplierId": 124121,
    "supplierName": "Some Supplier Site",
    "notBeforeDate": 35235252, 
    "notAfterDate": 325235252351, 
    "totalCost": 243.231, 
    "currencyCode": "USD"
  }]
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

ITEM_MASTER

Yes

No

No

No

PRODUCT_CONFIG_OPTIONS

Yes

No

No

No

V_ORDHEAD

Yes

No

No

No

V_ORDSKU

Yes

No

No

No

V_SUPS

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Manage Purchase Orders - Get Purchase Order Cancel Reasons

This section describes the Cancel Reason Code List service.

Functional Area

Procurement

Business Overview

Retrieves all purchase order cancel reason codes.

Service Type

Get

ReST URL
/PurchaseOrders/recent/cancelReasonCodeList
Input Parameters

No input.

Output

CodeDetailRDO

Parameter Name Data Type

code

String

codeDescription

String

codeSequence

BigDecimal

JSON Structure

[
  {
    "code": null,
    "codeDescription": null,
    "codeSequence": null,
    "links": [ ],
    "hyperMediaContent": {
      "linkRDO": [ ]
    }
  }
]
Table Impact
TABLE SELECT INSERT UPDATE DELETE

CODE_HEAD

Yes

No

No

No

CODE_DETAIL

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Manage Purchase Orders - Get Purchase Order Header

This section describes the Get Purchase Order Summary service.

Functional Area

Procurement

Business Overview

This service retrieves purchase order header detail with open to buy information.

Service Type

Get

ReST URL
/PurchaseOrders/recent/PurchaseOrderSummary?orderNumber={orderNumber}
Input Parameters

Order Number-Required

Output

RpoOrderSumRDO

Parameter Name Data Type

orderNumber

BigDecimal

status

String

supplier

BigDecimal

supplierName

String

notBeforeDate

Long

notAfterDate

Long

otbEowDate

Long

terms

String

termsCode

String

termsDescription

String

totalCost

BigDecimal

totalRetail

BigDecimal

Currency

String

createId

String

writtenDate

Long

defaultDisplayLevel

String

previouslyApprovedIndicator

String

editableIndicator

String

otbTable

List<RpoOrderSumOtbRDO>

RpoOrderSumOtbRDO

Parameter Name Data Type

department

BigDecimal

classId

BigDecimal

subclassId

BigDecimal

subclassName

String

orderAmount

BigDecimal

budgetAmount

BigDecimal

receivedAmount

BigDecimal

approvedAmount

BigDecimal

outstandingAmount

BigDecimal

JSON Structure

{
  “orderNumber":12345,
  “statusId":"W",
  “supplierId":12345,
  “supplierName": “Supplier 12345",
  “notBeforeDate": 1234567,
  “notAfterDate": 236573,
  "terms":"01",
  "termsCode":"01234",
  "termsDescription":"Letter Of Credit",
  “totalCost": 123.45,
  “totalRetail": 456.78,
  “currencyCode": “CAD",
  “createdBy": “BUYER",
  “writtenDate": 1234567,
  "otbResults":
   [{
      "department" : 12345,
      "classId": 12345,
      "subClassId" : 12345,
      "subClassName": "subClassName"
      "budgetAmount": 12345.545,
      "orderAmount": 12345.545,
      "receivedAmount": 12345.545,
      "approvedAmount": 12345.545
  }]
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

COST_ZONE_GROUP_LOC

Yes

No

No

No

COUNTRY_ATTRIB

Yes

No

No

No

DEPS

Yes

No

No

No

ELC_COMP

Yes

No

No

No

ITEM_COST_HEAD

Yes

No

No

No

ITEM_EXP_DETAIL

Yes

No

No

No

ITEM_EXP_HEAD

Yes

No

No

No

ITEM_LOC

Yes

No

No

No

ITEM_MASTER

Yes

No

No

No

ITEM_SUPP_COUNTRY

Yes

No

No

No

MV_CURRENCY_CONVERSION_RATES

Yes

No

No

No

ORDHEAD

Yes

No

No

No

ORDLOC

Yes

No

No

No

ORDLOC_EXP

Yes

No

No

No

ORDSKU

Yes

No

No

No

ORDSKU_HTS

Yes

No

No

No

ORDSKU_HTS_ASSESS

Yes

No

No

No

OTB

Yes

No

No

No

PERIOD

Yes

No

No

No

PRODUCT_CONFIG_OPTIONS

Yes

No

No

No

STORE

Yes

No

No

No

SUPS

Yes

No

No

No

V_ORDHEAD

Yes

No

No

No

V_PACKSKU_QTY

Yes

No

No

No

V_SUBCLASS_TL

Yes

No

No

No

V_SUPS

Yes

No

No

No

V_TERMS_HEAD_TL

Yes

No

No

No

WH

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Manage Purchase Orders - Get Purchase Order Items for an Order

This section describes the Get Purchase Order Items service.

Functional Area

Procurement

Business Overview

This service retrieves items details for an order number. Based on the display level, the items record aggregates to the level specified when applicable.

Service Type

Get

ReST URL
/PurchaseOrders/recent/PurchaseOrderItems?orderNumber={orderNumber}&itemDisplayLevel={itemDisplayLevel}&pageSize={pageSize}&pageNumber={pageNumber}
Input Parameters

Order Number - Required

Item Display Level - Optional - valid values PARENT_LEVEL, PARENT_DIFF_LEVEL, or TRAN_LEVEL

Page Size - Optional

Page Number - Optional

Output

RpoOrderSumItemRDO

Parameter Name Data Type

item

String

ItemDescription

String

diff1

String

diff1Description

String

diff2

String

diff2Description

String

diff3

String

diff3Description

String

diff4

String

diff4Description

String

quantityOrdered

BigDecimal

totalCost

BigDecimal

currency

String

itemImageUrl

String

PagedResultsRDO

Parameter Name Data Type

totalRecordCount

BigDecimal

Next Page URL

String

Previous Page URL

String

JSON Structure

{
  "type": "paginationRDO",
  "totalRecordCount": 252,
  "hyperMediaContent": {},
  "links": [], 
  "orderNumber": 1212131,
  "results": [{
    "itemId": 1234
    "itemDescription": "some item",
    "firstDiffId": 123424,
    "firstDiffDescription": "desc",
    "secondDiffId": 12345
    "secondDiffDescription" : "desc",
    "thirdDiffId": 1234324
    "thirdDiffDescription" : "desc",
    "fourthDiffId" : 1324,
    "fourthDiffDescription" : "desc",
    "quanityOrdered": 100,
    "totalCost" : 12345.353,
    "currencyCode": "USD",
    "itemImageUrl": "http://..."
  }]
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

ITEM_IMAGE

Yes

No

No

No

ITEM_MASTER

Yes

No

No

No

ORDLOC

Yes

No

No

No

ORDSKU

Yes

No

No

No

ORDLOC_WKSHT

Yes

No

No

No

V_ITEM_MASTER

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Manage Purchase Orders - Get Purchase Order Locations for an Order/Item

This section describes the Get Purchase Order Item Locations service.

Functional Area

Procurement

Business Overview

This service retrieves item location details for an order number. The location record aggregates based on the display level when applicable.

Service Type

Get

ReST URL
/PurchaseOrders/recent/PurchaseOrderItemLocations?orderNumber={orderNumber}&item={item}&itemDisplayLevel={itemDisplayLevel}&diff1={diff1}&diff2={diff2}&diff3={diff3}&diff4={diff4}&pageSize={pageSize}&pageNumber={pageNumber}
Input Parameters
Parameter Name Required Description Valid values

orderNumber

Yes

Order number

item

Yes

Item Id

itemDisplayLevel

No

Item display level

PARENT_LEVEL, PARENT_DIFF_LEVEL, TRAN_LEVEL

diff1

No

Diff1 Id

diff2

No

Diff2 Id

diff3

No

Diff3 Id

diff4

No

Diff4 Id

pageSize

No

Maximum number of items to retrieve per page

pageNumber

No

Result page to retrieve

Output

RpoOrderItemLocRDO

Parameter Name Data Type

location

BigDecimal

locationName

String

quantityOrdered

BigDecimal

totalCost

BigDecimal

currency

String

PagedResultsRDO

Parameter Name Data Type

totalRecordCount

BigDecimal

Next Page URL

String

Previous Page URL

String

JSON Structure

{
  "locations" : [
    {
      "locationId" : 12345,
      "locationName" : "some location",
      "orderedQuantity" : 1000,
      "totalCost" : 12345.234,
      "currencyCode" : "USD"
    },
    {
      "locationId" : 12345,
      "locationName" : "some location",
      "orderedQuantity" : 1000,
      "totalCost" : 12345.234,
      "currencyCode" : "USD"
    }
  ]
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

ITEM_MASTER

Yes

No

No

No

ORDLOC

Yes

No

No

No

V_STORE_TL

Yes

No

No

No

V_WH_TL

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Manage Purchase Orders - Get Purchase Order Origins

This section describes the Origin Code List service.

Functional Area

Procurement

Business Overview

Retrieves all purchase order origin codes.

Service Type

Get

ReST URL
/PurchaseOrders/recent/originCodeList
Input Parameters

No input.

Output

CodeDetailRDO

Parameter Name Data Type

code

String

codeDescription

String

codeSequence

BigDecimal

JSON Structure

[
  {
    "code": null,
    "codeDescription": null,
    "codeSequence": null,
    "links": [ ],
    "hyperMediaContent": {
      "linkRDO": [ ]
    }
  }
]
Table Impact
TABLE SELECT INSERT UPDATE DELETE

CODE_HEAD

Yes

No

No

No

CODE_DETAIL

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Manage Purchase Orders - Get Purchase Order Statuses

This section describes the Purchase Order Status list.

Functional Area

Procurement

Business Overview

Retrieves all valid purchase order statuses.

Service Type

Get

ReST URL
/PurchaseOrders/recent/purchaseOrderStatusList
Input Parameters

No input.

Output

CodeDetailRDO

Parameter Name Data Type

code

String

codeDescription

String

codeSequence

BigDecimal

JSON Structure

[
  {
    "code": null,
    "codeDescription": null,
    "codeSequence": null,
    "links": [ ],
    "hyperMediaContent": {
      "linkRDO": [ ]
    }
  }
]
Table Impact
TABLE SELECT INSERT UPDATE DELETE

CODE_HEAD

Yes

No

No

No

CODE_DETAIL

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Manage Purchase Orders - Get Users Who Have Created Purchase Orders

This section describes the Search Purchase Order User ID.

Functional Area

Procurement

Business Overview

This service retrieves a list of user IDs associated with creating a purchase order.

Service Type

Get

ReST URL
/PurchaseOrders/recent/searchUserIds?searchString={searchString}&pageSize={pageSize}&pageNumber={pageNumber}
Input Parameters
  • Search String - Required

  • Page Size - Optional

  • Page Number - Optional

Output

VarcharIdRDO

Parameter Name Data Type

id

String

PagedResultsRDO

Parameter Name Data Type

totalRecordCount

BigDecimal

Next Page URL

String

Previous Page URL

String

JSON Structure

{
  "totalRecordCount": null,
  "results": [
    {
      "id": null,
      "links": [ ],
      "hyperMediaContent": {
        "linkRDO": [ ]
      }
    }
  ],
  "links": [ ],
  "hyperMediaContent": {
    "linkRDO": [ ]
  }
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

V_ORDHEAD

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Mobile Workflow Purchase Order Upload Service

The following services are included in this functional area:

Create Purchase Order - Simple

Business Overview

This Web service calls the existing Merchandising XOrder API directly with input parameters. For more information on Merchandising XOrder API, see the sections addressing both the Store Order Subscription API and the PO Subscription API.

Service Type

Post

ReST URL

/PurchaseOrders

Input Parameters

Example json RDO input:

{
         "links" : [ ],
          "itemRDOs" : [ {
            "links" : [ ],
           "item" : null,
           "location" :null,
            "unitCost" : null,
            "referenceItem" : null,
            "originCountryId" : null,
            "suppPackSize" : null,
            "qtyOrdered" : null,
            "locationType" : null,
            "cancelInd" : null,
            "reInstateInd" : null,
            "hyperMediaContent" : {
              "linkRDO" : [ ]
            }
          } ],
          "orderNo" : null,
          "supplier" : null,
          "currencyCode" : null,
          "terms" : null,
          "notBeforeDate" : null,
          "notAfterDate" : null,
          "status" : "A",
          "writtenDate" : null,
          "origInd" : null,
          "user_id" : null,
          "dept" : null,
          "exchangeRate" : null,
          "includeOnOrdInd" : null,
          "ediPoInd" : null,
          "preMarkInd" : null,
          "comment" : null,
          "otbEowDate" : null,
          "hyperMediaContent" : {
            "linkRDO" : [ ]
          }
        }
Output

NA

Table Impact

For more information on Merchandising XOrder API, see the Store Order Subscription API and the PO Subscription API sections.

Manage Purchase Orders - Approve Purchase Orders

This section describes the Approve Purchase Orders service.

Functional Area

Procurement

Business Overview

This service approves a list of purchase orders.

Service Type

Post

ReST URL

/PurchaseOrders/recent/approvePurchaseOrders?orderNumbers={orderNumbers}

Input Parameters

Order Number -Required-comma separated list

Output

RpoStatusRDO

Parameter Name Data Type

successOrdersCount

BigDecimal

successOrdersTable

List<BigDecimal>

failOrdersCount

BigDecimal

failOrdersTable

List<RpoFailRDO>

RpoFailRDO

Parameter Name Data Type

orderNumber

BigDecimal

errorMessage

String

JSON Structure:
{
    "successOrdersCount": 0,
    "successOrdersTable": [],
    "failOrdersCount": 2,
    "failOrdersTable": [
        {
            "orderNumber": 123,
            "errorMessage": " Invalid Order Number.",
            "links": [],
            "hyperMediaContent": {
                "linkRDO": []
            }
        },
        {
            "orderNumber": 987,
            "errorMessage": "Invalid Order Number.",
            "links": [],
            "hyperMediaContent": {
                "linkRDO": []
            }
        }
    ],
    "links": [],
    "hyperMediaContent": {
        "linkRDO": []
    }
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

ALC_HEAD_TEMP

No

No

No

Yes

ALLOC_CHRG_TEMP

No

No

No

Yes

ALLOC_DETAIL

Yes

No

Yes

No

ALLOC_DETAIL_TEMP

No

No

No

Yes

ALLOC_HEADER

Yes

No

Yes

No

ALLOC_HEADER_TEMP

No

No

No

Yes

CONTRACT_COST_HIST

Yes

Yes

No

No

CONTRACT_DETAIL

Yes

No

Yes

No

CONTRACT_HEADER

Yes

No

Yes

No

DEAL_ACTUALS_FORECAST

No

No

No

Yes

DEAL_ACTUALS_ITEM_LOC

No

No

No

Yes

DEAL_COMP_PROM

No

No

No

Yes

DEAL_DETAIL

No

No

No

Yes

DEAL_HEAD

No

No

No

Yes

DEAL_HEAD_CFA_EXT

No

No

No

Yes

DEAL_ITEMLOC_DCS

No

No

No

Yes

DEAL_ITEMLOC_DIV_GRP

No

No

No

Yes

DEAL_ITEMLOC_ITEM

No

No

No

Yes

DEAL_ITEMLOC_PARENT_DIFF

No

No

No

Yes

DEAL_QUEUE

No

No

No

Yes

DEAL_THRESHOLD

No

No

No

Yes

DEAL_THRESHOLD_REV

No

No

No

Yes

DOC

Yes

No

No

No

DOC_LINK

Yes

No

No

No

ITEM_LOC

Yes

No

Yes

No

ITEM_MASTER

Yes

No

No

No

ITEM_SUPP_COUNTRY

Yes

No

No

No

ITEM_TICKET

Yes

No

No

No

LC_ACTIVITY

Yes

No

No

No

LC_AMENDMENTS

Yes

Yes

No

No

LC_DETAIL

Yes

Yes

No

No

LC_HEAD

Yes

No

Yes

No

LC_ORDAPPLY

No

Yes

No

Yes

ORD_INV_MGMT

Yes

No

No

Yes

ORD_LC_AMENDMENTS

Yes

No

No

No

ORDCUST

Yes

No

No

No

ORDCUST_DETAIL

Yes

Yes

No

Yes

ORDDIST_ITEM_TEMP

No

No

No

Yes

ORDHEAD

Yes

No

No

No

ORDHEAD_REV

No

Yes

No

No

ORDLC

Yes

No

Yes

No

ORDLOC

Yes

No

Yes

No

ORDLOC_DISCOUNT

No

No

No

Yes

ORDLOC_DISCOUNT_TEMP

No

No

No

Yes

ORDLOC_EXP_TEMP

No

No

No

Yes

ORDLOC_REV

No

Yes

No

No

ORDLOC_TEMP

No

No

No

Yes

ORDLOC_WKSHT

Yes

No

No

Yes

ORDSKU

Yes

No

No

No

ORDSKU_HTS

Yes

No

No

No

ORDSKU_HTS_ASSESS_TEMP

No

No

No

Yes

ORDSKU_HTS_TEMP

No

No

No

Yes

ORDSKU_REV

No

Yes

No

No

ORDSKU_TEMP

No

No

No

Yes

OTB

Yes

Yes

Yes

No

OTB_CASCADE_STG

No

Yes

No

No

PARTNER_ORG_UNIT

Yes

No

No

No

POP_TERMS_DEF

No

No

No

Yes

POP_TERMS_FULFILLMENT

No

No

No

Yes

PROCUREMENT_UNIT_OPTIONS

Yes

No

No

No

REPL_RESULTS_TEMP

No

No

No

Yes

REQ_DOC

Yes

Yes

No

No

REQ_DOC_TEMP

No

No

No

Yes

REV_ORDERS

No

No

No

Yes

RTM_UNIT_OPTIONS

Yes

No

No

No

STORE

Yes

No

No

No

SUP_AVAIL

Yes

No

Yes

No

SUPS

Yes

No

No

No

SYSTEM_CONFIG_OPTIONS

Yes

No

No

No

TAX_CALC_EVENT

Yes

Yes

No

No

TAX_EVENT_RUN_TYPE

Yes

No

No

No

TICKET_REQUEST

No

Yes

No

No

TIMELINE_TEMP

No

No

No

Yes

TRANSIT_TIMES

Yes

No

No

No

V_PACKSKU_QTY

Yes

No

No

No

WH

Yes

No

No

No

WO_DETAIL_TEMP

No

No

No

Yes

WO_HEAD_TEMP

No

No

No

Yes

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Manage Purchase Orders - Cancel Purchase Orders

This section describes the Cancel Purchase Orders service.

Functional Area

Procurement

Business Overview

This service cancels a list of purchase order.

Service Type

Post

ReST URL

/PurchaseOrders/recent/cancelPurchaseOrders?orderNumbers={orderNumbers}

Input Parameters

Order Number -Required-comma separated list

Output

RpoStatusRDO

Parameter Name Data Type

successOrdersCount

BigDecimal

successOrdersTable

List<BigDecimal>

failOrdersCount

BigDecimal

failOrdersTable

List<RpoFailRDO>

RpoFailRDO

Parameter Name Data Type

orderNumber

BigDecimal

errorMessage

String

JSON Structure:
{
    "successOrdersCount": 0,
    "successOrdersTable": [],
    "failOrdersCount": 2,
    "failOrdersTable": [
        {
            "orderNumber": 123,
            "errorMessage": "Invalid Reason Code.",
            "links": [],
            "hyperMediaContent": {
                "linkRDO": []
            }
        },
        {
            "orderNumber": 987,
            "errorMessage": "Invalid Order Number.",
            "links": [],
            "hyperMediaContent": {
                "linkRDO": []
            }
        }
    ],
    "links": [],
    "hyperMediaContent": {
        "linkRDO": []
    }
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

ALLOC_DETAIL

Yes

No

Yes

No

ALLOC_HEADER

Yes

No

Yes

No

APPT_DETAIL

Yes

No

No

No

APPT_HEAD

Yes

No

No

No

CODE_DETAIL

Yes

No

No

No

DEAL_CALC_QUEUE

No

No

No

Yes

ORDHEAD

Yes

No

Yes

No

ORDLOC

Yes

No

Yes

No

OTB

No

No

Yes

No

SHIPMENT

Yes

No

Yes

No

SHIPSKU

Yes

No

Yes

No

SYSTEM_OPTIONS

Yes

No

No

No

WH

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Manage Purchase Orders - Reject Purchase Orders

This section describes the Reject Purchase Orders service.

Functional Area

Procurement

Business Overview

This service rejects a list of purchase order.

Service Type

Post

ReST URL

/PurchaseOrders/recent/rejectPurchaseOrders?orderNumbers={orderNumbers}

Input Parameters

Order Numbers - Required - comma separated list

Output

RpoStatusRDO

Parameter Name Data Type

successOrdersCount

BigDecimal

successOrdersTable

List<BigDecimal>

failOrdersCount

BigDecimal

failOrdersTable

List<RpoFailRDO>

RpoFailRDO

Parameter Name Data Type

orderNumber

BigDecimal

errorMessage

String

JSON Structure:
{
    "successOrdersCount": 0,
    "successOrdersTable": [],
    "failOrdersCount": 2,
    "failOrdersTable": [
        {
            "orderNumber": 123,
            "errorMessage": " Invalid Order Number.",
            "links": [],
            "hyperMediaContent": {
                "linkRDO": []
            }
        },
        {
            "orderNumber": 987,
            "errorMessage": "Invalid Order Number.",
            "links": [],
            "hyperMediaContent": {
                "linkRDO": []
            }
        }
    ],
    "links": [],
    "hyperMediaContent": {
        "linkRDO": []
    }
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

ALLOC_DETAIL

No

No

Yes

No

ALLOC_HEADER

Yes

No

Yes

No

CONTRACT_DETAIL

Yes

No

Yes

No

CONTRACT_HEADER

Yes

No

Yes

No

ITEM_MASTER

Yes

No

No

No

LC_ORDAPPLY

No

No

No

Yes

ORDHEAD

Yes

No

Yes

No

ORDLOC

Yes

No

No

No

OTB

No

No

Yes

No

SHIPMENT

Yes

No

No

No

SHIPSKU

Yes

No

No

No

SYSTEM_OPTIONS

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Manage Purchase Orders - Update Purchase Order Dates

This section describes the Update Purchase Orders Date service.

Functional Area

Procurement

Business Overview

This service update list of purchase order dates. If no date is sent or sent as null then the assumption is there is no change on the current record date.

Service Type

Post

ReST URL

/PurchaseOrders/recent/updatePurchaseOrderDate?notBeforeDate={notBeforeDate}&notAfterDate={notAfterDate}&otbEowDate={otbEowDate}&orderNumbers={orderNumbers}

Input Parameters

Order Numbers - Required - comma separated list

Not Before Date - Optional - in a long format

Not After Date - Optional - in a long format

OTB EWO Date - Optional - in a long format

Output

RpoStatusRDO

Parameter Name Data Type

successOrdersCount

BigDecimal

successOrdersTable

List<BigDecimal>

failOrdersCount

BigDecimal

failOrdersTable

List<RpoFailRDO>

RpoFailRDO

Parameter Name Data Type

orderNumber

BigDecimal

errorMessage

String

JSON Structure:
{
    "successOrdersCount": 0,
    "successOrdersTable": [],
    "failOrdersCount": 2,
    "failOrdersTable": [
        {
            "orderNumber": 123,
            "errorMessage": "Invalid Reason Code.",
            "links": [],
            "hyperMediaContent": {
                "linkRDO": []
            }
        },
        {
            "orderNumber": 987,
            "errorMessage": "Invalid Reason Code.",
            "links": [],
            "hyperMediaContent": {
                "linkRDO": []
            }
        }
    ],
    "links": [],
    "hyperMediaContent": {
        "linkRDO": []
    }
}
Table Impact
TABLE SELECT INSERT UPDATE DELETE

ALLOC_HEADER

No

No

Yes

No

CONTRACT_HEADER

Yes

No

No

No

DEAL_HEAD

Yes

No

Yes

No

ORDHEAD

Yes

No

Yes

No

OTB

No

No

Yes

No

SHIPMENT

Yes

No

No

No

SYSTEM_OPTIONS

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

JOB_AUDIT_PAYLOAD

No

Yes

No

No

Purchase Order Download Service

The following services are included in this functional area:

Get Purchase Order Details

Endpoints
MerchIntegrations/services/procurement/order
MerchIntegrations/services/procurement/order/{orderNo}
Functional Area

Purchase Orders

Business Overview

This service publishes external purchase orders to downstream consuming systems. The payload includes order header and line-location detail, along with supplier-sourcing, location, and customer-order enrichment. The JSON view returns orders only when ORDHEAD.STATUS is A, W, S, or C, ORDHEAD.ORIG_APPROVAL_DATE is not null, and ORDHEAD.ORDER_TYPE <> 'DSD', so DSD orders and orders that have never crossed an approval event are not included. Worksheet and submitted statuses can appear in the payload only after the order has already been approved at least once, and orderLocationType is derived as S, W, or SW depending on whether the order locations are stores, warehouses, or a mix of both.

The publication for order based on order detail line is only when unit cost or estimated in stock date or quantity ordered is changed. This service will not publish orders when shipping or receiving of the order has started.

Technical Details

This service follows the Publish API cache architecture in which the REST service serves pre-generated JSON from an integration cache table that is initially seeded and then maintained through asynchronous delta processing. For overall enablement, scheduling, and guidance on how publish api works and how webhook for this api can be implemented to stream the data out, refer to the white paper Publish APIs - Customer Enablement Overview.

Core business tables: ORDHEAD, ORDLOC

Additional business tables: ORDSKU, ORDCUST, ORDCUST_DETAIL, ITEM_SUPP_COUNTRY, STORE, WH, DEPS, BUYER, RPM_PROMO, CODE_DETAIL, V_TERMS_HEAD_TL, PO_TYPE, V_PARTNER_TL, V_OUTLOC_TL, ORDHEAD_CFA_EXT, ORDSKU_CFA_EXT, ORDLOC_CFA_EXT

JSON cache table: MERCHAPI_EXT_ORDER

JSON generation view: V_MERCHAPI_EXT_ORDER_JSON

Builds the header from ORDHEAD, the detail array from ORDLOC and ORDSKU, OMS linkage from ORDCUST and ORDCUST_DETAIL, item-supplier sourcing attributes from ITEM_SUPP_COUNTRY, location enrichment from WH and STORE, descriptive lookup values from DEPS, BUYER, RPM_PROMO, CODE_DETAIL, V_TERMS_HEAD_TL, PO_TYPE, V_PARTNER_TL, and V_OUTLOC_TL, and header, item, and item-location custom flex attributes from MERCHAPI_EXT_ORDER_CFA, MERCHAPI_EXT_ORDER_ITEM_CFA, and MERCHAPI_EXT_ORD_ITEM_LOC_CFA.

The view only publishes orders where ORDHEAD.STATUS is one of A, W, S, or C, ORDHEAD.ORIG_APPROVAL_DATE is not null, and ORDHEAD.ORDER_TYPE <> 'DSD'.

This means DSD orders and orders that have never crossed an approval event are not returned, even though worksheet and submitted statuses can still appear later in the payload after the order has already been approved once.

Initial Seeding and post enablement rebuild/repair

Initial seeding and rebuild pull published rows from V_MERCHAPI_EXT_ORDER_JSON. No additional filter criteria were identified beyond the cache-build logic.

Mark cache rows deleted when the order no longer exists in V_MERCHAPI_EXT_ORDER_JSON.

ICL (Integration Change Log) table: ICL_RMS_ORDER (ICL consumer name = MERCHAPI)

ICL entries are created using triggers on ORDHEAD, ORDLOC, ORDHEAD_CFA_EXT, ORDLOC_CFA_EXT, and ORDSKU_CFA_EXT.

Batch Configuration. Asynchronous delta processing is supported using Background engine and also via POM scheduling. Choose one.

Process configuration name: API_EXT_ORDER

To enable via Background engine set BACKGROUND_RUN_FLAG to Y and review the BACKGROUND_RUN_INTERVAL_SECOND parameter.

POM Batch schedule process and job: MERCHAPI_DELTA_EXT_ORDER_ADHOC_PROCESS -> MERCHAPI_EXT_ORDER_ADHOC_JOB

Webhook configuration api name: procurement/order

Special handling

Additional GET query parameters: supplier, orderOriginatedInd, notBeforeDate, notAfterDate, importOrderInd, locType.

These filters are not backed by dedicated cache-table indexes. At high volume, use them only as additional criteria on top of a small-window delta fetch and not for full downloads.

Performance Considerations

For customers expecting high to very high publish volume from this API, sizing and operational tuning should be addressed early in the implementation lifecycle. Initial cache seeding, ongoing delta processing, full extracts, and incremental downloads or webhook-driven delivery have different runtime characteristics and should be evaluated separately. The available configuration for this service should therefore be reviewed and validated against the customer's projected production data profile, including expected volume, message size, and access pattern, with the key performance-related configuration for this service covering the following:

Multi-threading and commit control

This service supports multi-threaded execution for both initial seeding and delta processing. Thread count is controlled through API_NO_OF_THREADS, and commit sizing is controlled through API_COMMIT_MAX_COUNTER.

For initial seeding, thread and commit settings should be chosen together based on expected row volume, average message size, and the complex SQL query required to build the message from multiple base and supporting tables. Common starting points for large-volume seeding are 8, 16, or 32 threads. Values of 48 or 64 threads should be considered only after testing and with awareness of competing workload in the environment.

API_COMMIT_MAX_COUNTER should be sized together with the thread setting. Typical values can range from about 100 to 1,000 rows, with higher values such as 10,000 used in some cases after testing. Where payloads are larger or the source SQL is heavier because of the number of contributing tables, a lower thread count with a higher commit value may perform better.

For delta processing, the same parameters apply. The seeding commit setting is usually a reasonable starting point, but where qualifying business events can create short-term spikes, the commit value may need to remain on the lower side so backlog drains in smaller units of work.

Dropping indexes and constraints during seeding

This option applies only to initial seeding, including truncate-and-load execution. When thread and commit settings are high, concurrent inserts can increase index maintenance overhead and slow the load.

To reduce that overhead, DROP_INDEX_ON_REFRESH can be enabled so indexes and constraints are dropped before seeding and rebuilt after the load completes.

This can improve data-load throughput, but the overall refresh plan should also account for the additional time needed for index rebuild after the seeding step finishes. GATHER_STATS_ON_REFRESH should normally remain enabled unless testing shows a need to change it.

REST fetch considerations

REST page size should be selected based on average message size so that the average response remains below about 10 MB per call. Common page-limit values are 500, 1,000, 5,000, or 10,000 rows, and very small limits, especially below 100, should generally be avoided.

For full downloads, do not provide the since query parameter so the database can favor the primary-key access path. For delta downloads, use a small time window, typically a few minutes and at most a few hours, so the eligible row set on the LAST_UPDATE_DATETIME index remains small.

Wider delta windows, especially multi-day windows that can arise during outages or data recovery, generally do not perform well. For such scenarios, keeping BUILD_HISTOGRAM enabled allows the service to support recovery through smaller, more selective polling windows using the optimalBefore query parameter.

In this catch-up pattern, for requests up to 30 days in the past, the client provides optimalBefore and leaves before empty. The client then uses the returned before timestamp to continue polling incrementally until the backlog is cleared, and then resumes the normal short-window delta pattern. Hourly histogram processing groups LAST_UPDATE_DATETIME values into buckets of 10,000 rows in MERCHAPI_TIMESTAMP_HISTOGRAM using the shared HISTOGRAM_ROW_COUNT configuration.

Service Type

GET

ReST URL

MerchIntegrations/services/procurement/order

MerchIntegrations/services/procurement/order/{orderNo}

Input Parameters
Parameter Name Required Data Type Description

since

No

String

Since Date (Example: 2010-12-31T23:59:59.999Z)

before

No

String

Before Date (Example: 2040-12-31T23:59:59.999Z)

supplier

No

String (10)

Supplier

orderOriginatedInd

No

Number

Order Orginated Indicator

notBeforeDate

No

String

Not Before Date (Example: 2023-12-31)

notAfterDate

No

String

Not After Date (Example: 2023-12-31)

importOrderInd

No

String

Import Order Indicator - must be Y or N

locType

No

String

Order Location Type - must be S, W or SW

offsetkey

No

String (12)

Offset key (Order Number)

limit

No

String (6)

Pagination limit. Default value is 1000.

optimalBefore

No

String

Enables histogram-based calculation of the before timestamp when before is not provided. Valid values are Y or N. Default value is N.

include

No

String

Fields to include - comma separated (Example items.name,items.address.city)

exclude

No

String

Fields to exclude - comma separated (Example items.address.contactFax,items.customFlexAttribute)

Table 5-1315 Input Parameter for "MerchIntegrations/services/procurement/order/{orderNo}"

Parameter Name Required Data Type Description

orderNo

Yes

Number

include

No

String

Fields to include - comma separated (Example items.name,items.address.city)

exclude

No

String

Fields to exclude - comma separated (Example items.address.contactFax,items.customFlexAttribute)

Output

Table 5-1316 PageResultsItemsMerchApiOrder - Object. See list of elements for detail

Element Name Required Data Type Description

items

No

Collection of Object

Collection of records

hasMore

No

Boolean

Boolean to signify if there are additional pages of data. This is true if limit = count for pagination supported request

limit

No

Number

Requested page size. If the page size was not defined in the input request, a default page size is used to limit the number of records to fetch

count

No

Number

Number of record in the response object

links

No

Collection of Object

List of Self and/or Next URL

Table 5-1317 MerchApiOrder - Object. See list of elements for detail

Element Name Required Data Type Description

action

No

String (6)

Action for purchase order details.

docType

No

String (1)

This field indicates the type of document this message is for. Valid value is P for purchase order.

orderNo

No

Number(12,0)

This field contains the number to uniquely identify an order within the system.

status

No

String (1)

This field indicates the current status of the order.

orderType

No

String (3)

This field indicates the type of order.

orderTypeDescription

No

String (250)

This field contains the order type description.

dept

No

Number(4,0)

This field contains the department number for orders limited to a single department and will be null for orders involving items in more than one department.

deptName

No

String (120)

This field contains the name of the department.

buyer

No

Number(4,0)

This field contains the number associated with the buyer for the order.

buyerName

No

String (120)

This field contains the name of the authorized buyer.

supplier

No

Number(10,0)

This field contains the vendor number who will provide the merchandise specified in the order.

promotion

No

Number(10,0)

This field contains the promotion number associated with the order to provide a link between the order dialog and the promotions dialog.

promotionDescription

No

String (1000)

This field contains a description of the promotion. This value comes from Pricing.

qualityControlInd

No

String (1)

This field determines whether or not quality control will be required when items for this order are received.

notBeforeDate

No

date

This field contains the first date that delivery of the order will be accepted.

notAfterDate

No

date

This field contains the last date that delivery of the order will be accepted.

otbEowDate

No

date

This field contains the OTB budget bucket the order amount should be placed into.

earliestShipDate

No

date

This field contains the earliest date when the items on the purchase order can be shipped by the supplier. This represents the earliest ship date of all the items on the order.

latestShipDate

No

date

This field contains the date after which the items on the purchase order can no longer be shipped by the supplier. This represents the greatest latest ship date of all the items on the order.

closeDate

No

date

This field contains the date when the order is closed.

terms

No

String (15)

This field is an indicator identifying the sales terms for the order. These terms specify when payment is due and if any discounts exist for early payment.

termsCode

No

String (240)

This field contains the description associated with the terms code.

freightTerms

No

String (30)

This field contains an indicator that references what freight terms are related to the order. Valid values are in the FREIGHT_TERMS table.

paymentMethod

No

String (6)

This field indicates how the purchase order will be paid.

paymentMethodDescription

No

String (250)

This field contains the description of the payment method.

backhaulType

No

String (6)

This field contains the type of backhaul allowance that will be applied to the order.

backhaulTypeDescription

No

String (250)

This field contains the description of the backhaul type.

backhaulAllowance

No

Number(20,4)

This field contains the backhaul allowance value.

shipMethod

No

String (6)

This field contains the method used to ship the items on the purchase order from the country of origin to the country of import.

shipMethodDescription

No

String (250)

This field contains the description for the shipping method.

purchaseType

No

String (6)

This field indicates what is included in the supplier's cost of the item.

purchaseTypeDescription

No

String (250)

This field contains the description for the purchase type.

shipPayMethod

No

String (2)

This field contains the code indicating the payment terms for freight charges associated with the order.

shipPayMethodDescription

No

String (250)

This field contains the description of the given shipment payment method.

fobTransactionResponsibility

No

String (2)

This field contains the code indicating the type of the location that is responsible for the transportation of the order.

fobTransactionResponsibilityCodeDescription

No

String (250)

This field contains the description of the FOB transaction responsibility code.

fobTransactionResponsibilityDescription

No

String (250)

This field contains a user-entered field describing the code for the location responsible for the transportation of the order.

fobTitlePass

No

String (2)

This field contains an indicator used to determine where the title for goods is passed from the vendor to the purchaser. Examples include city, factory, or origin.

fobTitlePassCodeDescription

No

String (250)

This field contains the description of the FOB title pass code.

fobTitlePassDescription

No

String (250)

This field contains a user-entered field describing the code where the title of the merchandise is to be passed. It could be a city name, factory name, or place of origin.

vendorOrderNo

No

String (15)

This field contains the vendor's unique identifying number for an order. These orders may have originated by the vendor through the EDI process or this number can be associated with a Merchandising order when the order is created online.

exchangeRate

No

Number(20,10)

This field contains the rate of exchange used for the purchase order between the order and primary currencies.

factory

No

String (10)

This field contains the factory at which the items on the purchase order are made. This field is only available when the system is running Import functionality.

factoryDescription

No

String (240)

This field contains the description of the factory.

agent

No

String (10)

This field contains the agent that is used in the purchase of the items on the purchase order. This field is only available when the system is running Import functionality.

agentDesc

No

String (240)

This field contains the description of the agent.

dischargePort

No

String (5)

This field contains the port at which the items on the purchase order will enter the country of import. This field is only available when the system is running Import functionality.

dischargePortDescription

No

String (150)

This field contains the description of the discharge port.

ladingPort

No

String (5)

This field contains the port from which the items on the purchase order are shipped. This field is only available when the system is running Import functionality.

ladingPortDescription

No

String (150)

This field contains the description of the lading port.

freightContractNo

No

String (10)

This field contains the number of the contract with a shipper that will give specific freight rates. This field is only available when the system is running Import functionality.

poType

No

String (4)

This field contains the value associated with the PO_TYPE for the order. Valid values are in the PO_TYPE table.

poTypeDescription

No

String (120)

This field contains the description of the PO type.

preMarkInd

No

String (1)

This field indicates whether or not a supplier has agreed to break an order into separate boxes so that the boxes can be sent directly to stores.

currencyCode

No

String (3)

This field contains the currency code for the order. When creating an order within Merchandising, this field will always default to the currency of the supplier, but it can be overwritten.

contractNo

No

Number(6,0)

This field contains the contract number associated with this order.

pickupLocation

No

String (250)

This field contains the location at which the order will be picked up, if the order is a pickup order.

pickupNo

No

String (25)

This field contains the reference number for the pickup order.

pickupDate

No

date

This field contains the date when the order can be picked up from the supplier. This field is only required if the purchase type of the order is Pickup.

appointmentDatetime

No

date

This field contains the date of the receiving appointment at the warehouse.

comments

No

String (2000)

This field contains the miscellaneous comments attached to the purchase order.

writtenDate

No

date

This field specifies the date the order was created within the system.

orderOriginatedInd

No

Number(2,0)

This field indicates where the order originated.

originalApprovalDate

No

date

This field specifies the date that the order was originally approved.

originalApprovalId

No

String (254)

This field indicates where the order was approved. It will be the user ID of the person approving the order for all orders manually approved online and will contain Replen for orders automatically approved in the replenishment process.

ediSentInd

No

String (1)

This field indicates whether or not the order has been sent via EDI.

ediOrderInd

No

String (1)

This field indicates whether or not the order will be transmitted to the supplier via an Electronic Data Exchange transaction.

importOrderInd

No

String (1)

This field indicates if the purchase order is an import order.

importCountryId

No

String (3)

This field specifies the identifier of the country into which the items on the order are being imported.

partnerType1

No

String (6)

This field contains partner 1 type.

partner1

No

String (10)

This field contains additional partner 1.

partnerType2

No

String (6)

This field contains partner 2 type.

partner2

No

String (10)

This field contains additional partner 2.

partnerType3

No

String (6)

This field contains partner 3 type.

partner3

No

String (10)

This field contains additional partner 3.

importType

No

String (1)

This field specifies the importer/exporter assigned to the supplier of the purchase order.

importId

No

Number(10,0)

This field identifies the importer/exporter assigned to the supplier. This should reference the WH.WH column.

clearingZoneId

No

String (5)

This field contains the clearing zone ID.

routingLocationId

No

String (5)

This field contains the routing location for the import order.

deliverySupplier

No

Number(10,0)

This field holds the supplier or supplier site from where the goods are delivered.

wfOrderNo

No

Number(10,0)

This field contains the franchise order number for which the purchase order was created.

exchangeRateInd

No

String (1)

This field contains the exchange rate indicator on a document.

customerOrderNo

No

String (48)

This field holds the master customer order number from the Order Management System.

fullfillmentOrderNo

No

String (48)

This field holds the number from the Order Management System (OMS) related to the fulfillment details. One or more fulfillment orders could relate back to a single customer order in OMS.

customerOrderInd

No

String (1)

This field indicates whether the purchase order is linked to a customer order.

createDateTime

No

dateTime

This column holds the record creation date and time (UTC).

updateDateTime

No

dateTime

This column holds the date and time when the record was last updated (UTC).

customFlexAttribute

No

Collection of Object

This list holds custom flex attributes for the purchase order.

details

No

Collection of Object

This list holds details for the purchase order.

cacheTimestamp

No

dateTime

This field specifies the date and time when the record was fetched into the cache for web service publication (UTC).

cacheCreateTimestamp

No

dateTime

This field specifies the date and time when the record was first created for web service publication (UTC).

Table 5-1318 CustomFlexAttribute - Object. See list of elements for detail

Element Name Required Data Type Description

name

No

String (30)

This field holds the custom flex attribute name.

value

No

String (250)

This field holds the numeric or character value of the custom flex attribute.

valueDate

No

date

This field holds the date value of the custom flex attribute.

createDateTime

No

dateTime

This field holds the date and time when the custom flex attribute was created (UTC).

updateDateTime

No

dateTime

This field holds the date and time when the custom flex attribute was last updated (UTC).

Table 5-1319 OrderDetails - Object. See list of elements for detail

Element Name Required Data Type Description

item

No

String (25)

This field contains the unique alphanumeric value to identify the item included in the purchase order.

referenceItem

No

String (25)

This field contains the unique alphanumeric value to identify the reference item.

physicalLocationType

No

String (1)

This field contains the type of location in the location field.

physicalLocation

No

Number(10,0)

This field contains the actual physical location that the item will be ordered to. This field may contain a store or a physical warehouse.

virtualWarehouse

No

Number(10,0)

This field contains the virtual warehouse for the order location when the physical location type is warehouse.

physicalStoreType

No

String (6)

This field indicates the store type of the physical location store. This is only populated if physical location type is store.

physicalStockholdingInd

No

String (1)

This field indicates whether the physical location store is stockholding or not.

physicalQuantityOrdered

No

Number(12,4)

This field indicates the total quantity ordered to the physical location.

unitCost

No

Number(20,4)

This field contains the unit cost for the item/location on the order, including discounts (deal/bracket/allowance), but not landed cost components. This field is stored in order currency.

supplierInitialUnitCost

No

Number(20,4)

Initial supplier unit cost of the item/location on the order, before deals were applied. When discounts must be recalculated on an approved order, this cost will be used as the starting point. This value is captured as the current item/location/supplier/origin country cost at the time of order approval.

unitRetail

No

Number(20,4)

This field contains the current retail price in local currency for the SKU at this location.

prescaledQuantity

No

Number(12,4)

This field contains the order quantity (system generated or manually generated) for the item/location before order scaling processing was performed.

originalReplenishmentQuantity

No

Number(12,4)

This field contains the original order quantity generated by the replenishment process.

costSource

No

String (4)

This field indicates the basis for the cost of the item/location on the order and whether deals or brackets have been applied.

lastRoundedQuantity

No

Number(12,4)

This field holds the most recent system rounded order quantity value for the line item.

lastGroupRoundedQuantity

No

Number(12,4)

This field holds the last system rounded order quantity for the rounding group the location is a part of.

originCountryId

No

String (3)

This field contains the identifier of the country from which the item is being sourced.

supplierPackSize

No

Number(12,4)

This field contains the supplier pack size for this order/item.

earliestShipDate

No

date

This field contains the earliest date that the item can be shipped by the supplier.

latestShipDate

No

date

This field contains the date after which the item can not be shipped by the supplier.

pickupLocation

No

String (250)

This field contains the location at which the order will be picked up, if the order is a pickup order.

pickupNo

No

String (25)

This field is not used in Merchandising.

packingMethod

No

String (6)

This field indicates whether the packing method of the item in the container is flat or hanging. Valid values are defined under code type PKMT.

roundLevel

No

String (6)

This field will be used to determine how order quantities will be rounded to case, layer, and pallet.

transferOrderLinkId

No

Number(12,0)

This field contains a reference number to link the item on the transfer to any purchase orders that have been created to allow the from location (i.e. warehouse) on the transfer to fulfill the transfer quantity to the to location (i.e. store) on the transfer.

estimatedInStockDate

No

date

This field contains the date that the item on the PO is expected to be available to ship from the PO location to another location.

transactionUom

No

String (4)

This field holds the original transaction unit of measure to be passed on to the store system. It is only used for customer direct orders coming from the order management system. All quantities on the payload are expressed in the item's standard unit of measure.

itemLineNo

No

Number(10,0)

This field indicates the item line number from customer orders.

orderItemCreateDateTime

No

dateTime

This column holds the record order detail item creation date and time (UTC).

orderItemUpdateDateTime

No

dateTime

This column holds the date and time when the order detail item was last updated (UTC).

orderItemLocCreateDateTime

No

dateTime

This column holds the record order detail item location creation date and time (UTC).

orderItemLocUpdateDateTime

No

dateTime

This column holds the date and time when the order detail item location was last updated (UTC).

orderItemCustomFlexAttribute

No

Collection of Object

This list holds custom flex attributes for purchase order item details.

orderItemLocationCustomFlexAttribute

No

Collection of Object

This list holds custom flex attributes for purchase order item location details.

Table 5-1320 LinkItems - Object. See list of elements for detail

Element Name Required Data Type Description

href

No

String

Service URL

rel

No

String

This can be either 'self' or 'next'. The 'next' link is present if there are more pages to fetch and contains the offsetkey which uniquely identifies the last record of this response.

Sample Response Message

{
"items": [
{
"action": "INSERT",
"docType": "P",
"orderNo": 464690012,
"status": "A",
"orderType": "N/B",
"orderTypeDescription": null,
"dept": 1,
"deptName": null,
"buyer": 1000,
"buyerName": null,
"supplier": 2400,
"promotion": 41,
"promotionDescription": null,
"qualityControlInd": "Y",
"notBeforeDate": "2001-12-31",
"notAfterDate": "2001-12-31",
"otbEowDate": "2001-12-31",
"earliestShipDate": "2001-12-31",
"latestShipDate": "2001-12-31",
"closeDate": "2001-12-31",
"terms": "02",
"termsCode": null,
"freightTerms": "03",
"paymentMethod": "LC",
"paymentMethodDescription": null,
"backhaulType": null,
"backhaulTypeDescription": null,
"backhaulAllowance": 1.0,
"shipMethod": "32",
"shipMethodDescription": null,
"purchaseType": "FOB",
"purchaseTypeDescription": null,
"shipPayMethod": "PO",
"shipPayMethodDescription": null,
"fobTransactionResponsibility": "CA",
"fobTransactionResponsibilityCodeDescription": null,
"fobTransactionResponsibilityDescription": "US",
"fobTitlePass": "CC",
"fobTitlePassCodeDescription": null,
"fobTitlePassDescription": "US",
"vendorOrderNo": "9987001",
"exchangeRate": 2,
"factory": "100",
"factoryDescription": null,
"agent": "007",
"agentDesc": null,
"dischargePort": "480",
"dischargePortDescription": null,
"ladingPort": "7",
"ladingPortDescription": null,
"freightContractNo": "111",
"poType": "4000",
"poTypeDescription": null,
"preMarkInd": "Y",
"currencyCode": "USD",
"contractNo": 1,
"pickupLocation": null,
"pickupNo": null,
"pickupDate": "2001-12-31",
"appointmentDatetime": "2001-12-31",
"comments": "Create Order",
"writtenDate": "2001-12-31",
"orderOriginatedInd": 2,
"originalApprovalDate": "2001-12-31",
"originalApprovalId": null,
"ediSentInd": null,
"ediOrderInd": "Y",
"importOrderInd": null,
"importCountryId": "US",
"partnerType1": "AG",
"partner1": "007",
"partnerType2": "E",
"partner2": "4678",
"partnerType3": null,
"partner3": null,
"importType": "W",
"importId": 10001,
"clearingZoneId": null,
"routingLocationId": null,
"deliverySupplier": 1,
"wfOrderNo": 1,
"exchangeRateInd": null,
"customerOrderNo": null,
"fullfillmentOrderNo": null,
"customerOrderInd": null,
"createDateTime": "2001-12-31T23:59:59.000Z",
"updateDateTime": "2001-12-31T23:59:59.000Z",
"customFlexAttribute": [
{
"name": "attribute1",
"value": "value1",
"valueDate": "2001-12-31",
"createDateTime": "2001-12-31T23:59:59.000Z",
"updateDateTime": "2001-12-31T23:59:59.000Z"
}
],
"details": [
{
"item": "103900095",
"referenceItem": null,
"physicalLocationType": "W",
"physicalLocation": 6000,
"virtualWarehouse": 1,
"physicalStoreType": null,
"physicalStockholdingInd": null,
"physicalQuantityOrdered": 25,
"unitCost": 45.2,
"supplierInitialUnitCost": 1.0,
"unitRetail": 1.0,
"prescaledQuantity": 1.0,
"originalReplenishmentQuantity": 1.0,
"costSource": null,
"lastRoundedQuantity": 1.0,
"lastGroupRoundedQuantity": 1.0,
"originCountryId": "IN",
"supplierPackSize": 1,
"earliestShipDate": "2001-12-31",
"latestShipDate": "2001-12-31",
"pickupLocation": null,
"pickupNo": null,
"packingMethod": null,
"roundLevel": null,
"transferOrderLinkId": 1,
"estimatedInStockDate": "2001-12-31",
"transactionUom": null,
"itemLineNo": 1,
"orderItemCreateDateTime": "2001-12-31T23:59:59.000Z",
"orderItemUpdateDateTime": "2001-12-31T23:59:59.000Z",
"orderItemLocCreateDateTime": "2001-12-31T23:59:59.000Z",
"orderItemLocUpdateDateTime": "2001-12-31T23:59:59.000Z",
"orderItemCustomFlexAttribute": [
{
"name": "attribute1",
"value": "value1",
"valueDate": "2001-12-31",
"createDateTime": "2001-12-31T23:59:59.000Z",
"updateDateTime": "2001-12-31T23:59:59.000Z"
}
],
"orderItemLocationCustomFlexAttribute": [
{
"name": "attribute1",
"value": "value1",
"valueDate": "2001-12-31",
"createDateTime": "2001-12-31T23:59:59.000Z",
"updateDateTime": "2001-12-31T23:59:59.000Z"
}
]
}
],
"cacheTimestamp": "2001-12-31T23:59:59.000Z",
"cacheCreateTimestamp": "2001-12-31T23:59:59.000Z"
}
],
"hasMore": true,
"limit": 1000,
"count": 1000,
"links": [
{
"href": "https://<server>:<port>/Application/services/resources?limit=1000&since=1970-01-01T00:00:00.001Z&before=2024-01-01T00:00:00.001Z&offsetkey=1234,XYZ",
"rel": "next"
}
]
}
Table Impact

The list of table includes the data pre-processing for this service along with the table/views queried during the ReST call.

TABLE SELECT INSERT UPDATE DELETE
MERCHAPI_CONFIG Yes No No No
MERCHAPI_CONSUMER_CONFIG Yes No No No
MERCHAPI_ASYNC_REQUEST Yes No No No
MERCH_BATCH_PARAM Yes No No No
ORDHEAD Yes No No No
ORDHEAD_CFA_EXT Yes No No No
ORDSKU_CFA_EXT Yes No No No
ORDLOC_CFA_EXT Yes No No No
MERCHAPI_EXT_ORDER Yes Yes Yes Yes
V_MERCHAPI_EXT_ORDER_JSON Yes No No No
ICL_RMS_ORDER Yes No Yes Yes

Get Purchase Order Details by Order Number

Endpoints
MerchIntegrations/services/procurement/order
MerchIntegrations/services/procurement/order/{orderNo}
Functional Area

Purchase Orders

Business Overview

This service publishes external purchase orders to downstream consuming systems. The payload includes order header and line-location detail, along with supplier-sourcing, location, and customer-order enrichment. The JSON view returns orders only when ORDHEAD.STATUS is A, W, S, or C, ORDHEAD.ORIG_APPROVAL_DATE is not null, and ORDHEAD.ORDER_TYPE <> 'DSD', so DSD orders and orders that have never crossed an approval event are not included. Worksheet and submitted statuses can appear in the payload only after the order has already been approved at least once, and orderLocationType is derived as S, W, or SW depending on whether the order locations are stores, warehouses, or a mix of both.

The publication for order based on order detail line is only when unit cost or estimated in stock date or quantity ordered is changed. This service will not publish orders when shipping or receiving of the order has started.

Technical Details

This service follows the Publish API cache architecture in which the REST service serves pre-generated JSON from an integration cache table that is initially seeded and then maintained through asynchronous delta processing. For overall enablement, scheduling, and guidance on how publish api works and how webhook for this api can be implemented to stream the data out, refer to the white paper Publish APIs - Customer Enablement Overview.

Core business tables: ORDHEAD, ORDLOC

Additional business tables: ORDSKU, ORDCUST, ORDCUST_DETAIL, ITEM_SUPP_COUNTRY, STORE, WH, DEPS, BUYER, RPM_PROMO, CODE_DETAIL, V_TERMS_HEAD_TL, PO_TYPE, V_PARTNER_TL, V_OUTLOC_TL, ORDHEAD_CFA_EXT, ORDSKU_CFA_EXT, ORDLOC_CFA_EXT

JSON cache table: MERCHAPI_EXT_ORDER

JSON generation view: V_MERCHAPI_EXT_ORDER_JSON

Builds the header from ORDHEAD, the detail array from ORDLOC and ORDSKU, OMS linkage from ORDCUST and ORDCUST_DETAIL, item-supplier sourcing attributes from ITEM_SUPP_COUNTRY, location enrichment from WH and STORE, descriptive lookup values from DEPS, BUYER, RPM_PROMO, CODE_DETAIL, V_TERMS_HEAD_TL, PO_TYPE, V_PARTNER_TL, and V_OUTLOC_TL, and header, item, and item-location custom flex attributes from MERCHAPI_EXT_ORDER_CFA, MERCHAPI_EXT_ORDER_ITEM_CFA, and MERCHAPI_EXT_ORD_ITEM_LOC_CFA.

The view only publishes orders where ORDHEAD.STATUS is one of A, W, S, or C, ORDHEAD.ORIG_APPROVAL_DATE is not null, and ORDHEAD.ORDER_TYPE <> 'DSD'.

This means DSD orders and orders that have never crossed an approval event are not returned, even though worksheet and submitted statuses can still appear later in the payload after the order has already been approved once.

Initial Seeding and post enablement rebuild/repair

Initial seeding and rebuild pull published rows from V_MERCHAPI_EXT_ORDER_JSON. No additional filter criteria were identified beyond the cache-build logic.

Mark cache rows deleted when the order no longer exists in V_MERCHAPI_EXT_ORDER_JSON.

ICL (Integration Change Log) table: ICL_RMS_ORDER (ICL consumer name = MERCHAPI)

ICL entries are created using triggers on ORDHEAD, ORDLOC, ORDHEAD_CFA_EXT, ORDLOC_CFA_EXT, and ORDSKU_CFA_EXT.

Batch Configuration. Asynchronous delta processing is supported using Background engine and also via POM scheduling. Choose one.

Process configuration name: API_EXT_ORDER

To enable via Background engine set BACKGROUND_RUN_FLAG to Y and review the BACKGROUND_RUN_INTERVAL_SECOND parameter.

POM Batch schedule process and job: MERCHAPI_DELTA_EXT_ORDER_ADHOC_PROCESS -> MERCHAPI_EXT_ORDER_ADHOC_JOB

Webhook configuration api name: procurement/order

Special handling

Additional GET query parameters: supplier, orderOriginatedInd, notBeforeDate, notAfterDate, importOrderInd, locType.

These filters are not backed by dedicated cache-table indexes. At high volume, use them only as additional criteria on top of a small-window delta fetch and not for full downloads.

Performance Considerations

For customers expecting high to very high publish volume from this API, sizing and operational tuning should be addressed early in the implementation lifecycle. Initial cache seeding, ongoing delta processing, full extracts, and incremental downloads or webhook-driven delivery have different runtime characteristics and should be evaluated separately. The available configuration for this service should therefore be reviewed and validated against the customer's projected production data profile, including expected volume, message size, and access pattern, with the key performance-related configuration for this service covering the following:

Multi-threading and commit control

This service supports multi-threaded execution for both initial seeding and delta processing. Thread count is controlled through API_NO_OF_THREADS, and commit sizing is controlled through API_COMMIT_MAX_COUNTER.

For initial seeding, thread and commit settings should be chosen together based on expected row volume, average message size, and the complex SQL query required to build the message from multiple base and supporting tables. Common starting points for large-volume seeding are 8, 16, or 32 threads. Values of 48 or 64 threads should be considered only after testing and with awareness of competing workload in the environment.

API_COMMIT_MAX_COUNTER should be sized together with the thread setting. Typical values can range from about 100 to 1,000 rows, with higher values such as 10,000 used in some cases after testing. Where payloads are larger or the source SQL is heavier because of the number of contributing tables, a lower thread count with a higher commit value may perform better.

For delta processing, the same parameters apply. The seeding commit setting is usually a reasonable starting point, but where qualifying business events can create short-term spikes, the commit value may need to remain on the lower side so backlog drains in smaller units of work.

Dropping indexes and constraints during seeding

This option applies only to initial seeding, including truncate-and-load execution. When thread and commit settings are high, concurrent inserts can increase index maintenance overhead and slow the load.

To reduce that overhead, DROP_INDEX_ON_REFRESH can be enabled so indexes and constraints are dropped before seeding and rebuilt after the load completes.

This can improve data-load throughput, but the overall refresh plan should also account for the additional time needed for index rebuild after the seeding step finishes. GATHER_STATS_ON_REFRESH should normally remain enabled unless testing shows a need to change it.

REST fetch considerations

REST page size should be selected based on average message size so that the average response remains below about 10 MB per call. Common page-limit values are 500, 1,000, 5,000, or 10,000 rows, and very small limits, especially below 100, should generally be avoided.

For full downloads, do not provide the since query parameter so the database can favor the primary-key access path. For delta downloads, use a small time window, typically a few minutes and at most a few hours, so the eligible row set on the LAST_UPDATE_DATETIME index remains small.

Wider delta windows, especially multi-day windows that can arise during outages or data recovery, generally do not perform well. For such scenarios, keeping BUILD_HISTOGRAM enabled allows the service to support recovery through smaller, more selective polling windows using the optimalBefore query parameter.

In this catch-up pattern, for requests up to 30 days in the past, the client provides optimalBefore and leaves before empty. The client then uses the returned before timestamp to continue polling incrementally until the backlog is cleared, and then resumes the normal short-window delta pattern. Hourly histogram processing groups LAST_UPDATE_DATETIME values into buckets of 10,000 rows in MERCHAPI_TIMESTAMP_HISTOGRAM using the shared HISTOGRAM_ROW_COUNT configuration.

Service Type

GET

ReST URL

MerchIntegrations/services/procurement/order

MerchIntegrations/services/procurement/order/{orderNo}

Input Parameters
Parameter Name Required Data Type Description

since

No

String

Since Date (Example: 2010-12-31T23:59:59.999Z)

before

No

String

Before Date (Example: 2040-12-31T23:59:59.999Z)

supplier

No

String (10)

Supplier

orderOriginatedInd

No

Number

Order Orginated Indicator

notBeforeDate

No

String

Not Before Date (Example: 2023-12-31)

notAfterDate

No

String

Not After Date (Example: 2023-12-31)

importOrderInd

No

String

Import Order Indicator - must be Y or N

locType

No

String

Order Location Type - must be S, W or SW

offsetkey

No

String (12)

Offset key (Order Number)

limit

No

String (6)

Pagination limit. Default value is 1000.

optimalBefore

No

String

Enables histogram-based calculation of the before timestamp when before is not provided. Valid values are Y or N. Default value is N.

include

No

String

Fields to include - comma separated (Example items.name,items.address.city)

exclude

No

String

Fields to exclude - comma separated (Example items.address.contactFax,items.customFlexAttribute)

Table 5-1321 Input Parameter for "MerchIntegrations/services/procurement/order/{orderNo}"

Parameter Name Required Data Type Description

orderNo

Yes

Number

include

No

String

Fields to include - comma separated (Example items.name,items.address.city)

exclude

No

String

Fields to exclude - comma separated (Example items.address.contactFax,items.customFlexAttribute)

Output

Table 5-1322 PageResultsItemsMerchApiOrder - Object. See list of elements for detail

Element Name Required Data Type Description

items

No

Collection of Object

Collection of records

hasMore

No

Boolean

Boolean to signify if there are additional pages of data. This is true if limit = count for pagination supported request

limit

No

Number

Requested page size. If the page size was not defined in the input request, a default page size is used to limit the number of records to fetch

count

No

Number

Number of record in the response object

links

No

Collection of Object

List of Self and/or Next URL

Table 5-1323 MerchApiOrder - Object. See list of elements for detail

Element Name Required Data Type Description

action

No

String (6)

Action for purchase order details.

docType

No

String (1)

This field indicates the type of document this message is for. Valid value is P for purchase order.

orderNo

No

Number(12,0)

This field contains the number to uniquely identify an order within the system.

status

No

String (1)

This field indicates the current status of the order.

orderType

No

String (3)

This field indicates the type of order.

orderTypeDescription

No

String (250)

This field contains the order type description.

dept

No

Number(4,0)

This field contains the department number for orders limited to a single department and will be null for orders involving items in more than one department.

deptName

No

String (120)

This field contains the name of the department.

buyer

No

Number(4,0)

This field contains the number associated with the buyer for the order.

buyerName

No

String (120)

This field contains the name of the authorized buyer.

supplier

No

Number(10,0)

This field contains the vendor number who will provide the merchandise specified in the order.

promotion

No

Number(10,0)

This field contains the promotion number associated with the order to provide a link between the order dialog and the promotions dialog.

promotionDescription

No

String (1000)

This field contains a description of the promotion. This value comes from Pricing.

qualityControlInd

No

String (1)

This field determines whether or not quality control will be required when items for this order are received.

notBeforeDate

No

date

This field contains the first date that delivery of the order will be accepted.

notAfterDate

No

date

This field contains the last date that delivery of the order will be accepted.

otbEowDate

No

date

This field contains the OTB budget bucket the order amount should be placed into.

earliestShipDate

No

date

This field contains the earliest date when the items on the purchase order can be shipped by the supplier. This represents the earliest ship date of all the items on the order.

latestShipDate

No

date

This field contains the date after which the items on the purchase order can no longer be shipped by the supplier. This represents the greatest latest ship date of all the items on the order.

closeDate

No

date

This field contains the date when the order is closed.

terms

No

String (15)

This field is an indicator identifying the sales terms for the order. These terms specify when payment is due and if any discounts exist for early payment.

termsCode

No

String (240)

This field contains the description associated with the terms code.

freightTerms

No

String (30)

This field contains an indicator that references what freight terms are related to the order. Valid values are in the FREIGHT_TERMS table.

paymentMethod

No

String (6)

This field indicates how the purchase order will be paid.

paymentMethodDescription

No

String (250)

This field contains the description of the payment method.

backhaulType

No

String (6)

This field contains the type of backhaul allowance that will be applied to the order.

backhaulTypeDescription

No

String (250)

This field contains the description of the backhaul type.

backhaulAllowance

No

Number(20,4)

This field contains the backhaul allowance value.

shipMethod

No

String (6)

This field contains the method used to ship the items on the purchase order from the country of origin to the country of import.

shipMethodDescription

No

String (250)

This field contains the description for the shipping method.

purchaseType

No

String (6)

This field indicates what is included in the supplier's cost of the item.

purchaseTypeDescription

No

String (250)

This field contains the description for the purchase type.

shipPayMethod

No

String (2)

This field contains the code indicating the payment terms for freight charges associated with the order.

shipPayMethodDescription

No

String (250)

This field contains the description of the given shipment payment method.

fobTransactionResponsibility

No

String (2)

This field contains the code indicating the type of the location that is responsible for the transportation of the order.

fobTransactionResponsibilityCodeDescription

No

String (250)

This field contains the description of the FOB transaction responsibility code.

fobTransactionResponsibilityDescription

No

String (250)

This field contains a user-entered field describing the code for the location responsible for the transportation of the order.

fobTitlePass

No

String (2)

This field contains an indicator used to determine where the title for goods is passed from the vendor to the purchaser. Examples include city, factory, or origin.

fobTitlePassCodeDescription

No

String (250)

This field contains the description of the FOB title pass code.

fobTitlePassDescription

No

String (250)

This field contains a user-entered field describing the code where the title of the merchandise is to be passed. It could be a city name, factory name, or place of origin.

vendorOrderNo

No

String (15)

This field contains the vendor's unique identifying number for an order. These orders may have originated by the vendor through the EDI process or this number can be associated with a Merchandising order when the order is created online.

exchangeRate

No

Number(20,10)

This field contains the rate of exchange used for the purchase order between the order and primary currencies.

factory

No

String (10)

This field contains the factory at which the items on the purchase order are made. This field is only available when the system is running Import functionality.

factoryDescription

No

String (240)

This field contains the description of the factory.

agent

No

String (10)

This field contains the agent that is used in the purchase of the items on the purchase order. This field is only available when the system is running Import functionality.

agentDesc

No

String (240)

This field contains the description of the agent.

dischargePort

No

String (5)

This field contains the port at which the items on the purchase order will enter the country of import. This field is only available when the system is running Import functionality.

dischargePortDescription

No

String (150)

This field contains the description of the discharge port.

ladingPort

No

String (5)

This field contains the port from which the items on the purchase order are shipped. This field is only available when the system is running Import functionality.

ladingPortDescription

No

String (150)

This field contains the description of the lading port.

freightContractNo

No

String (10)

This field contains the number of the contract with a shipper that will give specific freight rates. This field is only available when the system is running Import functionality.

poType

No

String (4)

This field contains the value associated with the PO_TYPE for the order. Valid values are in the PO_TYPE table.

poTypeDescription

No

String (120)

This field contains the description of the PO type.

preMarkInd

No

String (1)

This field indicates whether or not a supplier has agreed to break an order into separate boxes so that the boxes can be sent directly to stores.

currencyCode

No

String (3)

This field contains the currency code for the order. When creating an order within Merchandising, this field will always default to the currency of the supplier, but it can be overwritten.

contractNo

No

Number(6,0)

This field contains the contract number associated with this order.

pickupLocation

No

String (250)

This field contains the location at which the order will be picked up, if the order is a pickup order.

pickupNo

No

String (25)

This field contains the reference number for the pickup order.

pickupDate

No

date

This field contains the date when the order can be picked up from the supplier. This field is only required if the purchase type of the order is Pickup.

appointmentDatetime

No

date

This field contains the date of the receiving appointment at the warehouse.

comments

No

String (2000)

This field contains the miscellaneous comments attached to the purchase order.

writtenDate

No

date

This field specifies the date the order was created within the system.

orderOriginatedInd

No

Number(2,0)

This field indicates where the order originated.

originalApprovalDate

No

date

This field specifies the date that the order was originally approved.

originalApprovalId

No

String (254)

This field indicates where the order was approved. It will be the user ID of the person approving the order for all orders manually approved online and will contain Replen for orders automatically approved in the replenishment process.

ediSentInd

No

String (1)

This field indicates whether or not the order has been sent via EDI.

ediOrderInd

No

String (1)

This field indicates whether or not the order will be transmitted to the supplier via an Electronic Data Exchange transaction.

importOrderInd

No

String (1)

This field indicates if the purchase order is an import order.

importCountryId

No

String (3)

This field specifies the identifier of the country into which the items on the order are being imported.

partnerType1

No

String (6)

This field contains partner 1 type.

partner1

No

String (10)

This field contains additional partner 1.

partnerType2

No

String (6)

This field contains partner 2 type.

partner2

No

String (10)

This field contains additional partner 2.

partnerType3

No

String (6)

This field contains partner 3 type.

partner3

No

String (10)

This field contains additional partner 3.

importType

No

String (1)

This field specifies the importer/exporter assigned to the supplier of the purchase order.

importId

No

Number(10,0)

This field identifies the importer/exporter assigned to the supplier. This should reference the WH.WH column.

clearingZoneId

No

String (5)

This field contains the clearing zone ID.

routingLocationId

No

String (5)

This field contains the routing location for the import order.

deliverySupplier

No

Number(10,0)

This field holds the supplier or supplier site from where the goods are delivered.

wfOrderNo

No

Number(10,0)

This field contains the franchise order number for which the purchase order was created.

exchangeRateInd

No

String (1)

This field contains the exchange rate indicator on a document.

customerOrderNo

No

String (48)

This field holds the master customer order number from the Order Management System.

fullfillmentOrderNo

No

String (48)

This field holds the number from the Order Management System (OMS) related to the fulfillment details. One or more fulfillment orders could relate back to a single customer order in OMS.

customerOrderInd

No

String (1)

This field indicates whether the purchase order is linked to a customer order.

createDateTime

No

dateTime

This column holds the record creation date and time (UTC).

updateDateTime

No

dateTime

This column holds the date and time when the record was last updated (UTC).

customFlexAttribute

No

Collection of Object

This list holds custom flex attributes for the purchase order.

details

No

Collection of Object

This list holds details for the purchase order.

cacheTimestamp

No

dateTime

This field specifies the date and time when the record was fetched into the cache for web service publication (UTC).

cacheCreateTimestamp

No

dateTime

This field specifies the date and time when the record was first created for web service publication (UTC).

Table 5-1324 CustomFlexAttribute - Object. See list of elements for detail

Element Name Required Data Type Description

name

No

String (30)

This field holds the custom flex attribute name.

value

No

String (250)

This field holds the numeric or character value of the custom flex attribute.

valueDate

No

date

This field holds the date value of the custom flex attribute.

createDateTime

No

dateTime

This field holds the date and time when the custom flex attribute was created (UTC).

updateDateTime

No

dateTime

This field holds the date and time when the custom flex attribute was last updated (UTC).

Table 5-1325 OrderDetails - Object. See list of elements for detail

Element Name Required Data Type Description

item

No

String (25)

This field contains the unique alphanumeric value to identify the item included in the purchase order.

referenceItem

No

String (25)

This field contains the unique alphanumeric value to identify the reference item.

physicalLocationType

No

String (1)

This field contains the type of location in the location field.

physicalLocation

No

Number(10,0)

This field contains the actual physical location that the item will be ordered to. This field may contain a store or a physical warehouse.

virtualWarehouse

No

Number(10,0)

This field contains the virtual warehouse for the order location when the physical location type is warehouse.

physicalStoreType

No

String (6)

This field indicates the store type of the physical location store. This is only populated if physical location type is store.

physicalStockholdingInd

No

String (1)

This field indicates whether the physical location store is stockholding or not.

physicalQuantityOrdered

No

Number(12,4)

This field indicates the total quantity ordered to the physical location.

unitCost

No

Number(20,4)

This field contains the unit cost for the item/location on the order, including discounts (deal/bracket/allowance), but not landed cost components. This field is stored in order currency.

supplierInitialUnitCost

No

Number(20,4)

Initial supplier unit cost of the item/location on the order, before deals were applied. When discounts must be recalculated on an approved order, this cost will be used as the starting point. This value is captured as the current item/location/supplier/origin country cost at the time of order approval.

unitRetail

No

Number(20,4)

This field contains the current retail price in local currency for the SKU at this location.

prescaledQuantity

No

Number(12,4)

This field contains the order quantity (system generated or manually generated) for the item/location before order scaling processing was performed.

originalReplenishmentQuantity

No

Number(12,4)

This field contains the original order quantity generated by the replenishment process.

costSource

No

String (4)

This field indicates the basis for the cost of the item/location on the order and whether deals or brackets have been applied.

lastRoundedQuantity

No

Number(12,4)

This field holds the most recent system rounded order quantity value for the line item.

lastGroupRoundedQuantity

No

Number(12,4)

This field holds the last system rounded order quantity for the rounding group the location is a part of.

originCountryId

No

String (3)

This field contains the identifier of the country from which the item is being sourced.

supplierPackSize

No

Number(12,4)

This field contains the supplier pack size for this order/item.

earliestShipDate

No

date

This field contains the earliest date that the item can be shipped by the supplier.

latestShipDate

No

date

This field contains the date after which the item can not be shipped by the supplier.

pickupLocation

No

String (250)

This field contains the location at which the order will be picked up, if the order is a pickup order.

pickupNo

No

String (25)

This field is not used in Merchandising.

packingMethod

No

String (6)

This field indicates whether the packing method of the item in the container is flat or hanging. Valid values are defined under code type PKMT.

roundLevel

No

String (6)

This field will be used to determine how order quantities will be rounded to case, layer, and pallet.

transferOrderLinkId

No

Number(12,0)

This field contains a reference number to link the item on the transfer to any purchase orders that have been created to allow the from location (i.e. warehouse) on the transfer to fulfill the transfer quantity to the to location (i.e. store) on the transfer.

estimatedInStockDate

No

date

This field contains the date that the item on the PO is expected to be available to ship from the PO location to another location.

transactionUom

No

String (4)

This field holds the original transaction unit of measure to be passed on to the store system. It is only used for customer direct orders coming from the order management system. All quantities on the payload are expressed in the item's standard unit of measure.

itemLineNo

No

Number(10,0)

This field indicates the item line number from customer orders.

orderItemCreateDateTime

No

dateTime

This column holds the record order detail item creation date and time (UTC).

orderItemUpdateDateTime

No

dateTime

This column holds the date and time when the order detail item was last updated (UTC).

orderItemLocCreateDateTime

No

dateTime

This column holds the record order detail item location creation date and time (UTC).

orderItemLocUpdateDateTime

No

dateTime

This column holds the date and time when the order detail item location was last updated (UTC).

orderItemCustomFlexAttribute

No

Collection of Object

This list holds custom flex attributes for purchase order item details.

orderItemLocationCustomFlexAttribute

No

Collection of Object

This list holds custom flex attributes for purchase order item location details.

Table 5-1326 LinkItems - Object. See list of elements for detail

Element Name Required Data Type Description

href

No

String

Service URL

rel

No

String

This can be either 'self' or 'next'. The 'next' link is present if there are more pages to fetch and contains the offsetkey which uniquely identifies the last record of this response.

Sample Response Message

{
"items": [
{
"action": "INSERT",
"docType": "P",
"orderNo": 464690012,
"status": "A",
"orderType": "N/B",
"orderTypeDescription": null,
"dept": 1,
"deptName": null,
"buyer": 1000,
"buyerName": null,
"supplier": 2400,
"promotion": 41,
"promotionDescription": null,
"qualityControlInd": "Y",
"notBeforeDate": "2001-12-31",
"notAfterDate": "2001-12-31",
"otbEowDate": "2001-12-31",
"earliestShipDate": "2001-12-31",
"latestShipDate": "2001-12-31",
"closeDate": "2001-12-31",
"terms": "02",
"termsCode": null,
"freightTerms": "03",
"paymentMethod": "LC",
"paymentMethodDescription": null,
"backhaulType": null,
"backhaulTypeDescription": null,
"backhaulAllowance": 1.0,
"shipMethod": "32",
"shipMethodDescription": null,
"purchaseType": "FOB",
"purchaseTypeDescription": null,
"shipPayMethod": "PO",
"shipPayMethodDescription": null,
"fobTransactionResponsibility": "CA",
"fobTransactionResponsibilityCodeDescription": null,
"fobTransactionResponsibilityDescription": "US",
"fobTitlePass": "CC",
"fobTitlePassCodeDescription": null,
"fobTitlePassDescription": "US",
"vendorOrderNo": "9987001",
"exchangeRate": 2,
"factory": "100",
"factoryDescription": null,
"agent": "007",
"agentDesc": null,
"dischargePort": "480",
"dischargePortDescription": null,
"ladingPort": "7",
"ladingPortDescription": null,
"freightContractNo": "111",
"poType": "4000",
"poTypeDescription": null,
"preMarkInd": "Y",
"currencyCode": "USD",
"contractNo": 1,
"pickupLocation": null,
"pickupNo": null,
"pickupDate": "2001-12-31",
"appointmentDatetime": "2001-12-31",
"comments": "Create Order",
"writtenDate": "2001-12-31",
"orderOriginatedInd": 2,
"originalApprovalDate": "2001-12-31",
"originalApprovalId": null,
"ediSentInd": null,
"ediOrderInd": "Y",
"importOrderInd": null,
"importCountryId": "US",
"partnerType1": "AG",
"partner1": "007",
"partnerType2": "E",
"partner2": "4678",
"partnerType3": null,
"partner3": null,
"importType": "W",
"importId": 10001,
"clearingZoneId": null,
"routingLocationId": null,
"deliverySupplier": 1,
"wfOrderNo": 1,
"exchangeRateInd": null,
"customerOrderNo": null,
"fullfillmentOrderNo": null,
"customerOrderInd": null,
"createDateTime": "2001-12-31T23:59:59.000Z",
"updateDateTime": "2001-12-31T23:59:59.000Z",
"customFlexAttribute": [
{
"name": "attribute1",
"value": "value1",
"valueDate": "2001-12-31",
"createDateTime": "2001-12-31T23:59:59.000Z",
"updateDateTime": "2001-12-31T23:59:59.000Z"
}
],
"details": [
{
"item": "103900095",
"referenceItem": null,
"physicalLocationType": "W",
"physicalLocation": 6000,
"virtualWarehouse": 1,
"physicalStoreType": null,
"physicalStockholdingInd": null,
"physicalQuantityOrdered": 25,
"unitCost": 45.2,
"supplierInitialUnitCost": 1.0,
"unitRetail": 1.0,
"prescaledQuantity": 1.0,
"originalReplenishmentQuantity": 1.0,
"costSource": null,
"lastRoundedQuantity": 1.0,
"lastGroupRoundedQuantity": 1.0,
"originCountryId": "IN",
"supplierPackSize": 1,
"earliestShipDate": "2001-12-31",
"latestShipDate": "2001-12-31",
"pickupLocation": null,
"pickupNo": null,
"packingMethod": null,
"roundLevel": null,
"transferOrderLinkId": 1,
"estimatedInStockDate": "2001-12-31",
"transactionUom": null,
"itemLineNo": 1,
"orderItemCreateDateTime": "2001-12-31T23:59:59.000Z",
"orderItemUpdateDateTime": "2001-12-31T23:59:59.000Z",
"orderItemLocCreateDateTime": "2001-12-31T23:59:59.000Z",
"orderItemLocUpdateDateTime": "2001-12-31T23:59:59.000Z",
"orderItemCustomFlexAttribute": [
{
"name": "attribute1",
"value": "value1",
"valueDate": "2001-12-31",
"createDateTime": "2001-12-31T23:59:59.000Z",
"updateDateTime": "2001-12-31T23:59:59.000Z"
}
],
"orderItemLocationCustomFlexAttribute": [
{
"name": "attribute1",
"value": "value1",
"valueDate": "2001-12-31",
"createDateTime": "2001-12-31T23:59:59.000Z",
"updateDateTime": "2001-12-31T23:59:59.000Z"
}
]
}
],
"cacheTimestamp": "2001-12-31T23:59:59.000Z",
"cacheCreateTimestamp": "2001-12-31T23:59:59.000Z"
}
],
"hasMore": true,
"limit": 1000,
"count": 1000,
"links": [
{
"href": "https://<server>:<port>/Application/services/resources?limit=1000&since=1970-01-01T00:00:00.001Z&before=2024-01-01T00:00:00.001Z&offsetkey=1234,XYZ",
"rel": "next"
}
]
}
Table Impact

The list of table includes the data pre-processing for this service along with the table/views queried during the ReST call.

TABLE SELECT INSERT UPDATE DELETE
MERCHAPI_CONFIG Yes No No No
MERCHAPI_CONSUMER_CONFIG Yes No No No
MERCHAPI_ASYNC_REQUEST Yes No No No
MERCH_BATCH_PARAM Yes No No No
ORDHEAD Yes No No No
ORDHEAD_CFA_EXT Yes No No No
ORDSKU_CFA_EXT Yes No No No
ORDLOC_CFA_EXT Yes No No No
MERCHAPI_EXT_ORDER Yes Yes Yes Yes
V_MERCHAPI_EXT_ORDER_JSON Yes No No No
ICL_RMS_ORDER Yes No Yes Yes

Purchase Order Upload Service

The following services are included in this functional area:

Create Pre-issued Order Numbers

Functional Area

Purchase Orders

Business Overview

This webservice generates pre-issued order numbers for the calling application with a set expiry date to be used in orders that will later be created and integrated to Merchandising.

Service Type

POST

ReST URL
MerchIntegrations/services/purchaseOrder/preIssuedOrderNumber/create
Input Payload Details

Table 5-1327 Create - Object. See list of elements for detail

Element Name Required Data Type Description

supplier

No

Number (10)

Contains the supplier to which the order number is assigned.

quantity

Yes

Number (4)

Contains the number of order numbers to be generated.

expiryDays

Yes

Number (4)

Contains the number of days before the pre-issued order numbers expire.

Sample Input Message

{
  "supplier": 2400,
  "quantity": 5,
  "expiryDays": 14
}
Response Code: 200 (Success)

Table 5-1328 CreateResponse - Object. See list of elements for detail

Element Name Required Data Type Description

orderNumbers

No

Collection of Object

References a collection of order numbers generated.

Table 5-1329 OrderNumbers - Object. See list of elements for detail

Element Name Required Data Type Description

supplier

No

Number (10)

Contains the supplier to which the order number is assigned.

orderNo

Yes

Number (12)

Contains the order number generated in Merchandising.

expiryDate

Yes

date

The date when the pre-issued order number will expire.

Sample Response Message

{
  "orderNumbers": [
    {
      "supplier": 2400,
      "orderNo": 90989990,
      "expiryDate": "2001-12-31"
    }
  ]
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element "validationErrors" will be present when input payload or input parameters are not as per the schema definition of this service. The element "businessError" will be present if the payload passes schema validation but exception is caught while processing business logic.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ],
  "businessError": [
    "Error message"
  ]
}

Create Purchase Order Details

Functional Area

Purchase Orders

Business Overview

This webservice is used to create new detail level attributes of the purchase order such as the addition of items and locations in order to keep Merchandising in sync with an external system that is responsible for maintaining purchase orders. Order details can be created for orders in Approved, Worksheet, Submitted or Closed status. The only information needed at the header level is the order number, which if not provided, will cause the message to be rejected. If an item/location combination has the Purchase Type as ‘Consignment / Concession’ for the primary supplier, then orders can only be created from the primary supplier for that location. In case of an order being raised for a parent item which is owned at a location but has consignment / concession child items under it, and the supplier is a non-primary one, then the child items which are not owned at that location will be omitted from the order.

For more details on Purchase Orders, see the Create Purchase Order service description.

Service Type

POST

ReST URL
MerchIntegrations/services/purchaseOrder/details/create
Input Payload Details

Table 5-1330 Create - Object. See list of elements for detail

Element Name Required Data Type Description

items

Yes

Collection of Object

Table 5-1331 Items - Object. See list of elements for detail

Element Name Required Data Type Description

orderNo

Yes

Number (12)

The unique identifier for the order.

approvedBy

No

String (254)

Indicates where the order was approved. It will be the user ID of the person approving the order.

dataLoadingDestination

No

String (6)

This field indicates if the order will be created in RMS or the staging tables. Valid values are RMS or STG. If not defined, the default is STG.

details

No

Collection of Object

This references the order detail node.

itemDetails

No

Collection of Object

This references the collection of items in the order.

Table 5-1332 Details - Object. See list of elements for detail

Element Name Required Data Type Description

item

No

String (25)

An approved, transaction level item. If a pack, it must be an orderable pack (with an order_as_type of 'P'). This is required if the ref_item field is not populated. An item/location may be added to the order in worksheet or approved status.

location

Yes

Number (10)

An active store or warehouse. If multichannel is on, and a warehouse is being order to, a virtual warehouse is expected. An item/location may be added to the order in worksheet or approved status.

locationType

No

String (1)

The location type of the location. Valid values are 'S' store and 'W' warehouse. This field cannot be modified.

unitCost

No

Number (20,4)

The cost of the item from the supplier in the order's currency. This can be modified if the status is worksheet or approved, but not if any portion of the item's order quantity is in transit or has been received. If it is not specified on the message, it will default from the item supplier cost for this location.

referenceItem

No

String (25)

The id of a reference item which can be used instead of using the item field. If the item field is not populated this field is required. A ref item/location may be added to the order in worksheet or approved status.

originCountry

No

String (3)

The identifier of the country from which the item is being sourced. This field cannot be modified.

supplierPackSize

No

Number (12,4)

The supplier pack size for the item on the order. This may be updated in worksheet or approved status.

quantityOrdered

No

Number (12,4)

The quantity ordered of item. This can be updated in worksheet or approved status to adjust the quantity of an item/location or cancel an item/location from the order.

cancelInd

No

String (1)

Indicates if the detail record's quantity should be cancelled. Valid values are 'Y'es and 'N'o.

reinstateInd

No

String (1)

Indicates if a detail record which was previously cancelled should be reinstated. This will reinstate in the order quantity the amount in the cancelled bucket. Valid values are 'Y'es and 'N'o.

deliveryDate

No

date

The date by which goods are to be delivered. There can be multiple item-locations on the order with different delivery dates.

quantityCancelled

No

Number (12,4)

This field contains the quantity that was left to be ordered when the line item was cancelled.

cancelCode

No

String (1)

This field contains the reason that the line item was cancelled. This field is required if a line item is cancelled.

estimatedInstockDate

No

date

Date that the item on the PO is expected to be available to ship from the PO location to another location. It is calculated as the Order Creation or Approval Date + Supplier Lead Time + Transit Days between the Supplier and the PO/location + Item/Warehouse Inbound Handling Days (if PO location is a warehouse).

earliestShipDate

No

date

The date before which the item can not be shipped by the supplier.

latestShipDate

No

date

The date after which the item can not be shipped by the supplier.

customFlexAttribute

No

Collection of Object

References a collection of custom flexible attributes for the order/location. This collection is treated as a single group and should include all named flexible attributes for the business entity. If any configured named attribute is missing from the input collection, its value will be set to NULL

Table 5-1333 CustomFlexAttribute - Object. See list of elements for detail

Element Name Required Data Type Description

name

Yes

String (30)

Holds the attribute name.

value

No

String (250)

Holds the numeric or string value of the attribute.

valueDate

No

date

Holds the date value of the attribute.

Table 5-1334 ItemDetails - Object. See list of elements for detail

Element Name Required Data Type Description

item

No

String (25)

An approved, transaction level item. If a pack, it must be an orderable pack (with an order_as_type of 'P'). This is required if the ref_item field is not populated. An item/location may be added to the order in worksheet or approved status.

customFlexAttribute

No

Collection of Object

References a collection of custom flexible attributes for ordsku. This collection is treated as a single group and should include all named flexible attributes for the business entity. If any configured named attribute is missing from the input collection, its value will be set to NULL

Sample Input Message

{
  "items": [
    {
      "orderNo": 464690012,
      "approvedBy": null,
      "dataLoadingDestination": "RMS",
      "details": [
        {
          "item": "103900095",
          "location": 6000,
          "locationType": "W",
          "unitCost": 45.2,
          "referenceItem": null,
          "originCountry": "IN",
          "supplierPackSize": 1,
          "quantityOrdered": 25,
          "cancelInd": null,
          "reinstateInd": null,
          "deliveryDate": "2001-12-31",
          "quantityCancelled": null,
          "cancelCode": null,
          "estimatedInstockDate": "2001-12-31",
          "earliestShipDate": "2001-12-31",
          "latestShipDate": "2001-12-31",
          "customFlexAttribute": [
            {
              "name": "REVIEW_DATE",
              "value": null,
              "valueDate": "2001-12-31"
            }
          ]
        }
      ],
      "itemDetails": [
        {
          "item": "103900095",
          "customFlexAttribute": [
            {
              "name": "REVIEW_DATE",
              "value": null,
              "valueDate": "2001-12-31"
            }
          ]
        }
      ]
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS",
  "message": "Service call is successful"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element "validationErrors" will be present when input payload or input parameters are not as per the schema definition of this service. The element "businessError" will be present if the payload passes schema validation but exception is caught while processing business logic.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ],
  "businessError": [
    "Error message"
  ]
}

Create Purchase Order Expenses

Functional Area

Purchase Orders

Business Overview

This webservice is used to create expense information on the purchase order within Merchandising in order to keep it in sync with an external system that is responsible for maintaining purchase orders. It also updates order header information with the values provided in the request if the order is not yet submitted or approved. Expenses may be created alongside the creation of a new order or added to an existing order that has location records defined. Internally, the service sets the status of the order to Worksheet in order to accommodate the modification of expense information for purchase orders in the system that have been submitted or approved. Validation of the new expense information is performed before automatic order re-approval is attempted.

For more details on Purchase Orders, see the Create Purchase Order service description.

Service Type

POST

ReST URL
MerchIntegrations/services/purchaseOrder/expenses/create
Input Payload Details

Table 5-1335 Create - Object. See list of elements for detail

Element Name Required Data Type Description

collectionSize

Yes

Number (4)

Number of items in the collection.

items

Yes

Collection of Object

References a collection of order expenses.

Table 5-1336 Items - Object. See list of elements for detail

Element Name Required Data Type Description

orderNo

Yes

Number (12)

The unique identifier for the order.

supplier

No

Number (10)

The identifier of the supplier from which the order will be sourced. This cannot be modified if details exist for the PO.

currencyCode

No

String (3)

The code of the order's currency. If not populated, the supplier's currency will be used. This field can be modified if the order status is worksheet or approved and the order has not been shipped.

terms

No

String (15)

The sales terms of the order. If not populated on the create message, will default to the supplier's terms. This can be modified in worksheet or approved status.

notBeforeDate

No

date

The first date that delivery will be accepted. This can be modified in worksheet or approved status.

notAfterDate

No

date

The last date that delivery will be accepted. This can be modified in worksheet or approved status.

otbEowDate

No

date

The end of week date of the OTB bucket used. This can be modified in worksheet or approved status.

dept

No

Number (4)

The department in which are all the items on the order. This field is required if the system enforces single department ordering. This cannot be modified if details exist for the PO.

status

No

String (1)

The code for the status of the order. Valid values are 'W' worksheet and 'A' approved for PO creation. It is also possible to modify the status to 'C' closed.

includeOnOrderInd

No

String (1)

Indicates if the order should be included in on-order calculations. This can be modified in worksheet or approved status. Valid values are Y and N.

writtenDate

No

date

The date the order was created. If this field is not populated on the message it will default to the time of creation in RMS. It cannot be modified.

origin

No

String (2)

Indicates where the order originated. Valid values include: 2 - Manual, 6 - AIP generated order, 7 , 8, 12 - Consignment Vendor Order.

ediPoInd

No

String (1)

Indicates whether or not the order will be transmitted to the supplier via an Electronic Data Exchange transaction. Valid values are: Y = Submit via EDI, N = Do not use EDI.

preMarkInd

No

String (1)

This field indicated whether or not a supplier has agreed to break an order into separate boxes so that the boxes can be sent directly to stores. Valid values are Y and N.

approvedBy

No

String (254)

Indicates where the order was approved. It will be the user ID of the person approving the order.

commentDesc

No

String (2000)

Any comments pertaining to the order.

dataLoadingDestination

No

String (6)

This field indicates if the order will be created in RMS or the staging tables. Valid values are RMS or STG. If not defined, the default is STG.

masterOrderNo

No

Number (12)

This field indicates the master order number from which child records were created.

ladingPort

No

String (5)

This field indicates the port from which the items on the purchase order are shipped.

dischargePort

No

String (5)

This field indicates the port at which the items on the purchase order will enter the country of import.

factory

No

String (10)

This field indicates the factory at which the items on the purchase order are made.

agent

No

String (10)

This field indicates the agent that is used in the purchase of the items on the purchase order.

shipMethod

No

String (6)

This field indicates the method used to ship the items on the purchase order from the country of origin to the country of import.

partnerType1

No

String (6)

This field indicates Partner 1 Type.

partner1

No

String (10)

This field indicates the Additional Partner 1.

partnerType2

No

String (6)

This field indicates Partner 2 Type.

partner2

No

String (10)

This field indicates the Additional Partner 2.

partnerType3

No

String (6)

This field indicates Partner 3 Type.

partner3

No

String (10)

This field indicates the Additional Partner 3.

importCountry

No

String (3)

The identifier of the country into which the items on the order are being imported.

purchaseType

No

String (6)

This field indicates whats included in the suppliers cost of the item. Valid values include C (Cost), CI (Cost and Insurance), CIF (Cost, Insurance and Freight) and FOB (Free on Board).

paymentMethod

No

String (6)

This field indicates the default method for how purchase orders for this site will be paid. Valid values are in the code type PYMT(Payment Method). Examples are Open Account(OA), Letter of Credit(LC) and Wire Transfer(WT).

titlePassLocationType

No

String (2)

Contains the code indicating the type of location or point where ownership of merchandise changes hands from seller/supplier to buyer/retailer. Valid values are found under the FOBT code type. Examples are City and State (AC), Country Of Sourcing (CA) and City (CI).

titlePassLocation

No

String (250)

Contains the description of the location or point where ownership of merchandise changes hands from seller/supplier to buyer/retailer.

purchaseOrderType

No

String (4)

This field contains the value associated with the PO_TYPE for the order.

orderType

No

String (3)

Indicates the type of order and which Open To Buy bucket will be updated. Valid values include: N/B - Non Basic, ARB - Automatic Reorder of Basic, BRB - Buyer Reorder of Basic, DSD - Direct Store Delivery

buyer

No

Number (4)

Contains the number associated with the buyer for the order.

location

No

Number (10)

This field contains the location all items on the order will be delivered to if populated. i. e. It will mean a single location order.

locationType

No

String (1)

This field contains the type of location in the location field. Valid values are: Valid values are S (Store) or W (Warehouse).

promotion

No

Number (10)

Contains the RPCS offer ID associated with the order to provide a link between the order dialog and the promotions dialog.

qualityControlInd

No

String (1)

Determines whether or not quality control will be required when items for this order are received. Valid values are Y and N.

freightTerms

No

String (30)

Indicator that references what freight terms are related to the order.

backhaulType

No

String (6)

This field contains the type of backhaul allowance that will be applied to the order. Some examples are Calculated or Flat rate.

backhaulAllowance

No

Number (20,4)

This field will contain the backhaul allowance value.

shipPayMethod

No

String (2)

Code indicating the payment terms for freight charges associated with the order. Valid values include: CC - Collect, CF - Collect Freight Credited Back to Customer, DF - Defined by Buyer and Seller, MX - Mixed, PC - Prepaid but Charged to Customer, PO - Prepaid Only, PP - Prepaid by Seller.

transportationResponsibilityType

No

String (2)

Contains the code indicating the type of location or point at which the responsibility for transportation transfers from the seller/supplier to the buyer/retailer. Valid values are found under the FOBT code type. Examples are City and State (AC), Country Of Sourcing (CA) and Country (CC).

transportationResponsibility

No

String (250)

Contains the description of the location or point at which the responsibility for transportation transfers from the seller/supplier to the buyer/retailer.

vendorOrderNo

No

String (15)

Contains the vendors unique identifying number for an order. These orders may have originated by the vendor through the EDI process or this number can be associated to a Oracle Retail order when the order is created on-line.

freightContractNo

No

String (10)

The number of the contract with a shipper that will give specific freight rates. This field is only available when the system is running Import functionality.

pickupLocation

No

String (250)

Contains the location at which the order will be picked up, if the order is a Pickup order.

pickupNo

No

String (25)

Contains the reference number of the Pickup order.

pickupDate

No

date

Contains the date when the order can be picked up from the Supplier. This field is only required if the Purchase Type of the order is Pickup.

appointmentDateTime

No

date-time

This column will hold the date and time of the receiving appointment at the warehouse.

importType

No

String (1)

Valid values are IMporter and EXporter. This is the default importer/exporter assigned to the supplier of the Puchase order.

importId

No

Number (10)

This identifies the importer/exporter assigned to the supplier. This should reference the WH. WH folumn with foreign key created.

clearingZoneId

No

String (5)

This column will hold the clearing zone id.

routingLocation

No

String (5)

This is the default routing location for the import order. FK on OUTLOC. OUTLOC_ID.

reApproveInd

No

String (1)

This field indicates that the update to the corresponding purchase order needs to be performed, and then it should be approved again. Valid values are Y and N.

earliestShipDate

No

date

The date before which the item can not be shipped by the supplier.

latestShipDate

No

date

The date after which the item can not be shipped by the supplier.

customFlexAttribute

No

Collection of Object

References a collection of custom flexible attributes at the order header level. This collection is treated as a single group and should include all named flexible attributes for the business entity. If any configured named attribute is missing from the input collection, its value will be set to NULL.

expenses

No

Collection of Object

References the expense associated with a particular item/location of the purchase order.

Table 5-1337 CustomFlexAttribute - Object. See list of elements for detail

Element Name Required Data Type Description

name

Yes

String (30)

Holds the attribute name.

value

No

String (250)

Holds the numeric or string value of the attribute.

valueDate

No

date

Holds the date value of the attribute.

Table 5-1338 Expenses - Object. See list of elements for detail

Element Name Required Data Type Description

item

Yes

String (25)

This field contains alphanumeric value that uniquely identifies the item.

packItem

No

String (25)

This field contains alphanumeric value that uniquely identifies the pack.

location

Yes

Number (10)

This field contains the location that item will be ordered to. This field may contain a store or a warehouse.

locationType

Yes

String (1)

This field contains the type of location in the location field. Valid values are: S - Store W - Warehouse.

component

Yes

String (10)

This field contains a user specified code representing a specific expense found on the ELC_COMP table.

computationValueBase

No

String (10)

This field contains a code representing the base value for calculating the expense.

calculationBasis

No

String (1)

This field contains the basis the expense will be calculated against if there is no CVB code attached to the expense. Valid values are S (Supplier) or O (Order). If the Cost Basis is S then when calculating the expense, the items supplier cost will be used. If the Cost Basis is O then the order unit cost of the item on the order will be used to calculate the expense. The code type for this field is EXCB.

componentRate

Yes

Number (20,4)

This field contains the rate to be charged against the calculation base of the component (either value or specific).

componentCurrency

Yes

String (3)

This field contains the currency the expense or assessment is to be entered in. If the Calculation Basis is V (Value), then comp_currency will be NULL.

exchangeRate

Yes

Number (20,10)

This field contains the exchange rate of the individual expense.

perCount

No

Number (12,4)

This field contains a count indicating the amount of the Per Count Unit of Measure to which the rate applies. When creating an expense that is defined as $. 20 for every 10 kilograms of an item ordered, the Per Count would be 10.

perCountUom

No

String (4)

This field contains the unit of measure in which the Per Count is specified. When creating an expense that is defined as $. 20 for every 10 kilograms of an item ordered, the Per Count UOM would be the Unit of Measure code for Kilograms.

nominationFlag1

Yes

String (1)

This field contains a flag that is used to indicate if the value of the cost component should be included in the calculation of another. Nomination flags are used to calculate the value of a Computation Value Base (CVB) which has the corresponding nomination flag set to Yes (Y). Valid values are: N/A (N) (the value of this component will not be included in CVBs which look at Nomination Flag 1), Add (+) (the value of this component will be added to CVBs which look at Nomination Flag 1), and Subtract (-) (the value of this component will be deducted from CVBs which look at Nomination Flag 1). For example, if cost component ABC has a + in Nomination Flag 1, then all CVBs that include Nomination Flag 1 will include this cost component value in their calculation basis.

inDuty

Yes

String (1)

If Import Management is enabled in Merchandising (i. e. system_options. import_ind = Y), the inDuty flag is used to indicate if the value of the cost component should be included in total duty.

nominationFlag3

Yes

String (1)

This field contains a flag that is used to indicate if the value of the cost component should be included in the calculation of another. Nomination flags are used to calculate the value of a Computation Value Base (CVB) which has the corresponding nomination flag set to Yes (Y). Valid values are: N/A (N) (the value of this component will not be included in CVBs which look at Nomination Flag 3), Add (+) (the value of this component will be added to CVBs which look at Nomination Flag 3), and Subtract (-) (the value of this component will be deducted from CVBs which look at Nomination Flag 3). For example, if cost component ABC has a + in Nomination Flag 3, then all CVBs that include Nomination Flag 3 will include this cost component value in their calculation basis.

inExpense

Yes

String (1)

See description for nom_flag_1. If ALC is turned on (i. e. system_options. import_ind = Y), nom_flag_2 is used to indicate the status of a component in duty calculation nom_flag_4 is used to indicate the status of a component in ELC calculation nom_flag_5 is used to indicate the status of a component in ALC calculation i. e. these 3 flags can not be used for any other purposes if ALC is turned on.

inAlc

Yes

String (1)

See description for nom_flag_1. If ALC is turned on (i. e. system_options. import_ind = Y), nom_flag_2 is used to indicate the status of a component in duty calculation nom_flag_4 is used to indicate the status of a component in ELC calculation nom_flag_5 is used to indicate the status of a component in ALC calculation i. e. these 3 flags can not be used for any other purposes if ALC is turned on.

Sample Input Message

{
  "collectionSize": 1,
  "items": [
    {
      "orderNo": 464690012,
      "supplier": 2400,
      "currencyCode": "USD",
      "terms": "02",
      "notBeforeDate": "2001-12-31",
      "notAfterDate": "2001-12-31",
      "otbEowDate": "2001-12-31",
      "dept": null,
      "status": "A",
      "includeOnOrderInd": "Y",
      "writtenDate": "2001-12-31",
      "origin": "2",
      "ediPoInd": "Y",
      "preMarkInd": "Y",
      "approvedBy": null,
      "commentDesc": "Create Order",
      "dataLoadingDestination": "RMS",
      "masterOrderNo": null,
      "ladingPort": "7",
      "dischargePort": "480",
      "factory": "100",
      "agent": "007",
      "shipMethod": "32",
      "partnerType1": "AG",
      "partner1": "007",
      "partnerType2": "E",
      "partner2": "4678",
      "partnerType3": null,
      "partner3": null,
      "importCountry": "US",
      "purchaseType": "FOB",
      "paymentMethod": "LC",
      "titlePassLocationType": "FF",
      "titlePassLocation": "US",
      "purchaseOrderType": "4000",
      "orderType": "N/B",
      "buyer": 1000,
      "location": null,
      "locationType": null,
      "promotion": 41,
      "qualityControlInd": "Y",
      "freightTerms": "03",
      "backhaulType": null,
      "backhaulAllowance": null,
      "shipPayMethod": "PO",
      "transportationResponsibilityType": "FF",
      "transportationResponsibility": "US",
      "vendorOrderNo": "9987001",
      "freightContractNo": "111",
      "pickupLocation": null,
      "pickupNo": null,
      "pickupDate": null,
      "appointmentDateTime": "2001-12-31T23:59:59.123Z",
      "importType": "W",
      "importId": 10001,
      "clearingZoneId": null,
      "routingLocation": null,
      "reApproveInd": null,
      "earliestShipDate": "2001-12-31",
      "latestShipDate": "2001-12-31",
      "customFlexAttribute": [
        {
          "name": "REVIEW_DATE",
          "value": null,
          "valueDate": "2001-12-31"
        }
      ],
      "expenses": [
        {
          "item": "103900095",
          "packItem": null,
          "location": 10001,
          "locationType": "W",
          "component": "OCFRT",
          "computationValueBase": null,
          "calculationBasis": null,
          "componentRate": 17,
          "componentCurrency": "INR",
          "exchangeRate": 29,
          "perCount": 1,
          "perCountUom": "M3",
          "nominationFlag1": "N",
          "inDuty": "N",
          "nominationFlag3": "N",
          "inExpense": "+",
          "inAlc": "N"
        }
      ]
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Create Purchase Order HTS

Functional Area

Purchase Orders

Business Overview

This webservice is used to create Harmonized Tariff Schedules and related assessments within Merchandising in order to keep it in sync with an external system that is responsible for maintaining purchase orders. It also updates order header information with the values provided in the request if the order has not yet been submitted or approved. HTS and Assessments may be created together with the creation of a new import order or added to an existing order. Internally, the service sets the status of the order to Worksheet in order to accommodate the addition of HTS information for purchase orders in the system that have been submitted or approved. Validation of the new HTS information is performed before automatic order re-approval is attempted.

For more details on Purchase Orders, see the Create Purchase Order service description.

Service Type

POST

ReST URL
MerchIntegrations/services/purchaseOrder/hts/create
Input Payload Details

Table 5-1339 Create - Object. See list of elements for detail

Element Name Required Data Type Description

collectionSize

Yes

Number (4)

Number of items in the collection.

items

Yes

Collection of Object

References a collection of order HTS records.

Table 5-1340 Items - Object. See list of elements for detail

Element Name Required Data Type Description

orderNo

Yes

Number (12)

The unique identifier for the order.

supplier

No

Number (10)

The identifier of the supplier from which the order will be sourced. This cannot be modified if details exist for the PO.

currencyCode

No

String (3)

The code of the order's currency. If not populated, the supplier's currency will be used. This field can be modified if the order status is worksheet or approved and the order has not been shipped.

terms

No

String (15)

The sales terms of the order. If not populated on the create message, will default to the supplier's terms. This can be modified in worksheet or approved status.

notBeforeDate

No

date

The first date that delivery will be accepted. This can be modified in worksheet or approved status.

notAfterDate

No

date

The last date that delivery will be accepted. This can be modified in worksheet or approved status.

otbEowDate

No

date

The end of week date of the OTB bucket used. This can be modified in worksheet or approved status.

dept

No

Number (4)

The department in which are all the items on the order. This field is required if the system enforces single department ordering. This cannot be modified if details exist for the PO.

status

No

String (1)

The code for the status of the order. Valid values are 'W' worksheet and 'A' approved for PO creation. It is also possible to modify the status to 'C' closed.

includeOnOrderInd

No

String (1)

Indicates if the order should be included in on-order calculations. This can be modified in worksheet or approved status. Valid values are Y and N.

writtenDate

No

date

The date the order was created. If this field is not populated on the message it will default to the time of creation in RMS. It cannot be modified.

origin

No

String (2)

Indicates where the order originated. Valid values include: 2 - Manual, 6 - AIP generated order, 7 , 8, 12 - Consignment Vendor Order.

ediPoInd

No

String (1)

Indicates whether or not the order will be transmitted to the supplier via an Electronic Data Exchange transaction. Valid values are: Y = Submit via EDI, N = Do not use EDI.

preMarkInd

No

String (1)

This field indicated whether or not a supplier has agreed to break an order into separate boxes so that the boxes can be sent directly to stores. Valid values are Y and N.

approvedBy

No

String (254)

Indicates where the order was approved. It will be the user ID of the person approving the order.

commentDesc

No

String (2000)

Any comments pertaining to the order.

dataLoadingDestination

No

String (6)

This field indicates if the order will be created in RMS or the staging tables. Valid values are RMS or STG. If not defined, the default is STG.

masterOrderNo

No

Number (12)

This field indicates the master order number from which child records were created.

ladingPort

No

String (5)

This field indicates the port from which the items on the purchase order are shipped.

dischargePort

No

String (5)

This field indicates the port at which the items on the purchase order will enter the country of import.

factory

No

String (10)

This field indicates the factory at which the items on the purchase order are made.

agent

No

String (10)

This field indicates the agent that is used in the purchase of the items on the purchase order.

shipMethod

No

String (6)

This field indicates the method used to ship the items on the purchase order from the country of origin to the country of import.

partnerType1

No

String (6)

This field indicates Partner 1 Type.

partner1

No

String (10)

This field indicates the Additional Partner 1.

partnerType2

No

String (6)

This field indicates Partner 2 Type.

partner2

No

String (10)

This field indicates the Additional Partner 2.

partnerType3

No

String (6)

This field indicates Partner 3 Type.

partner3

No

String (10)

This field indicates the Additional Partner 3.

importCountry

No

String (3)

The identifier of the country into which the items on the order are being imported.

purchaseType

No

String (6)

This field indicates whats included in the suppliers cost of the item. Valid values include C (Cost), CI (Cost and Insurance), CIF (Cost, Insurance and Freight) and FOB (Free on Board).

paymentMethod

No

String (6)

This field indicates the default method for how purchase orders for this site will be paid. Valid values are in the code type PYMT(Payment Method). Examples are Open Account(OA), Letter of Credit(LC) and Wire Transfer(WT).

titlePassLocationType

No

String (2)

Contains the code indicating the type of location or point where ownership of merchandise changes hands from seller/supplier to buyer/retailer. Valid values are found under the FOBT code type. Examples are City and State (AC), Country Of Sourcing (CA) and City (CI).

titlePassLocation

No

String (250)

Contains the description of the location or point where ownership of merchandise changes hands from seller/supplier to buyer/retailer.

purchaseOrderType

No

String (4)

This field contains the value associated with the PO_TYPE for the order.

orderType

No

String (3)

Indicates the type of order and which Open To Buy bucket will be updated. Valid values include: N/B - Non Basic, ARB - Automatic Reorder of Basic, BRB - Buyer Reorder of Basic, DSD - Direct Store Delivery

buyer

No

Number (4)

Contains the number associated with the buyer for the order.

location

No

Number (10)

This field contains the location all items on the order will be delivered to if populated. i. e. It will mean a single location order.

locationType

No

String (1)

This field contains the type of location in the location field. Valid values are: Valid values are S (Store) or W (Warehouse).

promotion

No

Number (10)

Contains the RPCS offer ID associated with the order to provide a link between the order dialog and the promotions dialog.

qualityControlInd

No

String (1)

Determines whether or not quality control will be required when items for this order are received. Valid values are Y and N.

freightTerms

No

String (30)

Indicator that references what freight terms are related to the order.

backhaulType

No

String (6)

This field contains the type of backhaul allowance that will be applied to the order. Some examples are Calculated or Flat rate.

backhaulAllowance

No

Number (20,4)

This field will contain the backhaul allowance value.

shipPayMethod

No

String (2)

Code indicating the payment terms for freight charges associated with the order. Valid values include: CC - Collect, CF - Collect Freight Credited Back to Customer, DF - Defined by Buyer and Seller, MX - Mixed, PC - Prepaid but Charged to Customer, PO - Prepaid Only, PP - Prepaid by Seller.

transportationResponsibilityType

No

String (2)

Contains the code indicating the type of location or point at which the responsibility for transportation transfers from the seller/supplier to the buyer/retailer. Valid values are found under the FOBT code type. Examples are City and State (AC), Country Of Sourcing (CA) and Country (CC).

transportationResponsibility

No

String (250)

Contains the description of the location or point at which the responsibility for transportation transfers from the seller/supplier to the buyer/retailer.

vendorOrderNo

No

String (15)

Contains the vendors unique identifying number for an order. These orders may have originated by the vendor through the EDI process or this number can be associated to a Oracle Retail order when the order is created on-line.

freightContractNo

No

String (10)

The number of the contract with a shipper that will give specific freight rates. This field is only available when the system is running Import functionality.

pickupLocation

No

String (250)

Contains the location at which the order will be picked up, if the order is a Pickup order.

pickupNo

No

String (25)

Contains the reference number of the Pickup order.

pickupDate

No

date

Contains the date when the order can be picked up from the Supplier. This field is only required if the Purchase Type of the order is Pickup.

appointmentDateTime

No

date-time

This column will hold the date and time of the receiving appointment at the warehouse.

importType

No

String (1)

Valid values are IMporter and EXporter. This is the default importer/exporter assigned to the supplier of the Puchase order.

importId

No

Number (10)

This identifies the importer/exporter assigned to the supplier. This should reference the WH. WH folumn with foreign key created.

clearingZoneId

No

String (5)

This column will hold the clearing zone id.

routingLocation

No

String (5)

This is the default routing location for the import order. FK on OUTLOC. OUTLOC_ID.

reApproveInd

No

String (1)

This field indicates that the update to the corresponding purchase order needs to be performed, and then it should be approved again. Valid values are Y and N.

earliestShipDate

No

date

The date before which the item can not be shipped by the supplier.

latestShipDate

No

date

The date after which the item can not be shipped by the supplier.

customFlexAttribute

No

Collection of Object

References a collection of custom flexible attributes at the order header level. This collection is treated as a single group and should include all named flexible attributes for the business entity. If any configured named attribute is missing from the input collection, its value will be set to NULL.

hts

No

Collection of Object

References the HTS code associated with a particular item of the purchase order.

Table 5-1341 CustomFlexAttribute - Object. See list of elements for detail

Element Name Required Data Type Description

name

Yes

String (30)

Holds the attribute name.

value

No

String (250)

Holds the numeric or string value of the attribute.

valueDate

No

date

Holds the date value of the attribute.

Table 5-1342 Hts - Object. See list of elements for detail

Element Name Required Data Type Description

item

Yes

String (25)

This field contains an unique alphanumeric value that identifies the item.

packItem

No

String (25)

This field contains alphanumeric value that uniquely identifies the pack.

hts

Yes

String (25)

This field contains an identifier for the Harmonized Tariff Schedule code.

status

Yes

String (1)

This field contains a flag to indicate the status of the Purchase Order/Item/HTS relationship. Valid values are (W)orksheet and (A)pproved.

originCountry

Yes

String (3)

This field contains the country of manufacture when the HTS tracking level is M. When the HTS tracking level is S, this stores the country of sourcing.

importCountry

No

String (3)

This field contains the country that the item will be imported in to.

assessments

No

Collection of Object

References the HTS code assessments associated with a particular item of the purchase order.

Table 5-1343 Assessments - Object. See list of elements for detail

Element Name Required Data Type Description

component

Yes

String (10)

This field contains a user specified code representing the specific assessment component found on the ELC_COMP table.

computationValueBase

No

String (10)

This field contains a code representing the base value for calculating the assessment.

componentRate

Yes

Number (20,4)

This field contains the rate to be charged against the calculation base. This field will hold a percentage value if the Calculation Basis of the Component is Value or a monetary amount in the currency defined for the assessment (usually the import country's currency) if the Calculation Basis is Specific.

perCount

No

Number (12,4)

This field contains a count indicating the amount of the Per Count Unit of Measure to which the rate applies. When creating an expense that is defined as $. 20 for every 10 kilograms of an item ordered, the Per Count would be 10.

perCountUom

No

String (4)

This field contains the unit of measure in which the Per Count is specified. When creating an expense that is defined as $. 20 for every 10 kilograms of an item ordered, the Per Count UOM would be the Unit of Measure code for Kilograms.

nominationFlag1

Yes

String (1)

This field contains a flag that is used to indicate if the value of the cost component should be included in the calculation of another. Nomination flags are used to calculate the value of a Computation Value Base (CVB) which has the corresponding nomination flag set to Yes (Y). Valid values are: N/A (N) (the value of this component will not be included in CVBs which look at Nomination Flag 1), Add (+) (the value of this component will be added to CVBs which look at Nomination Flag 1), and Subtract (-) (the value of this component will be deducted from CVBs which look at Nomination Flag 1). For example, if cost component ABC has a + in Nomination Flag 1, then all CVBs that include Nomination Flag 1 will include this cost component value in their calculation basis.

inDuty

Yes

String (1)

If Import Management is enabled in Merchandising (i. e. system_options. import_ind = Y), the inDuty flag is used to indicate if the value of the cost component should be included in total duty.

nominationFlag3

Yes

String (1)

This field contains a flag that is used to indicate if the value of the cost component should be included in the calculation of another. Nomination flags are used to calculate the value of a Computation Value Base (CVB) which has the corresponding nomination flag set to Yes (Y). Valid values are: N/A (N) (the value of this component will not be included in CVBs which look at Nomination Flag 3), Add (+) (the value of this component will be added to CVBs which look at Nomination Flag 3), and Subtract (-) (the value of this component will be deducted from CVBs which look at Nomination Flag 3). For example, if cost component ABC has a + in Nomination Flag 3, then all CVBs that include Nomination Flag 3 will include this cost component value in their calculation basis.

inExpense

Yes

String (1)

The inExpense flag is used to indicate if the value of the cost component should be included in total expenses.

inAlc

Yes

String (1)

The inALC flag is used for cost components where the retailer does not expect to receive an actual value for the charge via an obligation or customs entry. The inALC flag allows the value of the cost component to be included in ALC via direct nomination and indicates to the system that the estimated value on the order should be used as the actual value as well because no other actual will be provided.

Sample Input Message

{
  "collectionSize": 1,
  "items": [
    {
      "orderNo": 464690012,
      "supplier": 2400,
      "currencyCode": "USD",
      "terms": "02",
      "notBeforeDate": "2001-12-31",
      "notAfterDate": "2001-12-31",
      "otbEowDate": "2001-12-31",
      "dept": null,
      "status": "A",
      "includeOnOrderInd": "Y",
      "writtenDate": "2001-12-31",
      "origin": "2",
      "ediPoInd": "Y",
      "preMarkInd": "Y",
      "approvedBy": null,
      "commentDesc": "Create Order",
      "dataLoadingDestination": "RMS",
      "masterOrderNo": null,
      "ladingPort": "7",
      "dischargePort": "480",
      "factory": "100",
      "agent": "007",
      "shipMethod": "32",
      "partnerType1": "AG",
      "partner1": "007",
      "partnerType2": "E",
      "partner2": "4678",
      "partnerType3": null,
      "partner3": null,
      "importCountry": "US",
      "purchaseType": "FOB",
      "paymentMethod": "LC",
      "titlePassLocationType": "FF",
      "titlePassLocation": "US",
      "purchaseOrderType": "4000",
      "orderType": "N/B",
      "buyer": 1000,
      "location": null,
      "locationType": null,
      "promotion": 41,
      "qualityControlInd": "Y",
      "freightTerms": "03",
      "backhaulType": null,
      "backhaulAllowance": null,
      "shipPayMethod": "PO",
      "transportationResponsibilityType": "FF",
      "transportationResponsibility": "US",
      "vendorOrderNo": "9987001",
      "freightContractNo": "111",
      "pickupLocation": null,
      "pickupNo": null,
      "pickupDate": null,
      "appointmentDateTime": "2001-12-31T23:59:59.123Z",
      "importType": "W",
      "importId": 10001,
      "clearingZoneId": null,
      "routingLocation": null,
      "reApproveInd": null,
      "earliestShipDate": "2001-12-31",
      "latestShipDate": "2001-12-31",
      "customFlexAttribute": [
        {
          "name": "REVIEW_DATE",
          "value": null,
          "valueDate": "2001-12-31"
        }
      ],
      "hts": [
        {
          "item": "103900095",
          "packItem": null,
          "hts": "9014111112",
          "status": "W",
          "originCountry": "IN",
          "importCountry": "US",
          "assessments": [
            {
              "component": "DTYCAUS",
              "computationValueBase": null,
              "componentRate": 12,
              "perCount": 1,
              "perCountUom": "EA",
              "nominationFlag1": "N",
              "inDuty": "+",
              "nominationFlag3": "-",
              "inExpense": "N",
              "inAlc": "N"
            }
          ]
        }
      ]
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Create Purchase Order HTS Assessments

Functional Area

Purchase Orders

Business Overview

This webservice is used to create Harmonized Tariff Schedules assessments within Merchandising in order to keep it in sync with an external system that is responsible for maintaining purchase orders. It also updates order header information with the values provided in the request if the order is not yet submitted or approved. Assessments may be created together with the creation of a new import order or added to an existing order. Internally, the service sets the status of the order to Worksheet in order to accommodate the addition of HTS information for purchase orders in the system that have been submitted or approved. Validation of the new and updated information is performed before automatic order re-approval is attempted.

For more details on Purchase Orders, see the Create Purchase Order service description.

Service Type

POST

ReST URL
MerchIntegrations/services/purchaseOrder/hts/assessments/create
Input Payload Details

Table 5-1344 Create - Object. See list of elements for detail

Element Name Required Data Type Description

collectionSize

Yes

Number (4)

Number of items in the collection.

items

Yes

Collection of Object

References a collection of order HTS assessment records.

Table 5-1345 Items - Object. See list of elements for detail

Element Name Required Data Type Description

orderNo

Yes

Number (12)

The unique identifier for the order.

supplier

No

Number (10)

The identifier of the supplier from which the order will be sourced. This cannot be modified if details exist for the PO.

currencyCode

No

String (3)

The code of the order's currency. If not populated, the supplier's currency will be used. This field can be modified if the order status is worksheet or approved and the order has not been shipped.

terms

No

String (15)

The sales terms of the order. If not populated on the create message, will default to the supplier's terms. This can be modified in worksheet or approved status.

notBeforeDate

No

date

The first date that delivery will be accepted. This can be modified in worksheet or approved status.

notAfterDate

No

date

The last date that delivery will be accepted. This can be modified in worksheet or approved status.

otbEowDate

No

date

The end of week date of the OTB bucket used. This can be modified in worksheet or approved status.

dept

No

Number (4)

The department in which are all the items on the order. This field is required if the system enforces single department ordering. This cannot be modified if details exist for the PO.

status

No

String (1)

The code for the status of the order. Valid values are 'W' worksheet and 'A' approved for PO creation. It is also possible to modify the status to 'C' closed.

includeOnOrderInd

No

String (1)

Indicates if the order should be included in on-order calculations. This can be modified in worksheet or approved status. Valid values are Y and N.

writtenDate

No

date

The date the order was created. If this field is not populated on the message it will default to the time of creation in RMS. It cannot be modified.

origin

No

String (2)

Indicates where the order originated. Valid values include: 2 - Manual, 6 - AIP generated order, 7 , 8, 12 - Consignment Vendor Order.

ediPoInd

No

String (1)

Indicates whether or not the order will be transmitted to the supplier via an Electronic Data Exchange transaction. Valid values are: Y = Submit via EDI, N = Do not use EDI.

preMarkInd

No

String (1)

This field indicated whether or not a supplier has agreed to break an order into separate boxes so that the boxes can be sent directly to stores. Valid values are Y and N.

approvedBy

No

String (254)

Indicates where the order was approved. It will be the user ID of the person approving the order.

commentDesc

No

String (2000)

Any comments pertaining to the order.

dataLoadingDestination

No

String (6)

This field indicates if the order will be created in RMS or the staging tables. Valid values are RMS or STG. If not defined, the default is STG.

masterOrderNo

No

Number (12)

This field indicates the master order number from which child records were created.

ladingPort

No

String (5)

This field indicates the port from which the items on the purchase order are shipped.

dischargePort

No

String (5)

This field indicates the port at which the items on the purchase order will enter the country of import.

factory

No

String (10)

This field indicates the factory at which the items on the purchase order are made.

agent

No

String (10)

This field indicates the agent that is used in the purchase of the items on the purchase order.

shipMethod

No

String (6)

This field indicates the method used to ship the items on the purchase order from the country of origin to the country of import.

partnerType1

No

String (6)

This field indicates Partner 1 Type.

partner1

No

String (10)

This field indicates the Additional Partner 1.

partnerType2

No

String (6)

This field indicates Partner 2 Type.

partner2

No

String (10)

This field indicates the Additional Partner 2.

partnerType3

No

String (6)

This field indicates Partner 3 Type.

partner3

No

String (10)

This field indicates the Additional Partner 3.

importCountry

No

String (3)

The identifier of the country into which the items on the order are being imported.

purchaseType

No

String (6)

This field indicates whats included in the suppliers cost of the item. Valid values include C (Cost), CI (Cost and Insurance), CIF (Cost, Insurance and Freight) and FOB (Free on Board).

paymentMethod

No

String (6)

This field indicates the default method for how purchase orders for this site will be paid. Valid values are in the code type PYMT(Payment Method). Examples are Open Account(OA), Letter of Credit(LC) and Wire Transfer(WT).

titlePassLocationType

No

String (2)

Contains the code indicating the type of location or point where ownership of merchandise changes hands from seller/supplier to buyer/retailer. Valid values are found under the FOBT code type. Examples are City and State (AC), Country Of Sourcing (CA) and City (CI).

titlePassLocation

No

String (250)

Contains the description of the location or point where ownership of merchandise changes hands from seller/supplier to buyer/retailer.

purchaseOrderType

No

String (4)

This field contains the value associated with the PO_TYPE for the order.

orderType

No

String (3)

Indicates the type of order and which Open To Buy bucket will be updated. Valid values include: N/B - Non Basic, ARB - Automatic Reorder of Basic, BRB - Buyer Reorder of Basic, DSD - Direct Store Delivery

buyer

No

Number (4)

Contains the number associated with the buyer for the order.

location

No

Number (10)

This field contains the location all items on the order will be delivered to if populated. i. e. It will mean a single location order.

locationType

No

String (1)

This field contains the type of location in the location field. Valid values are: Valid values are S (Store) or W (Warehouse).

promotion

No

Number (10)

Contains the RPCS offer ID associated with the order to provide a link between the order dialog and the promotions dialog.

qualityControlInd

No

String (1)

Determines whether or not quality control will be required when items for this order are received. Valid values are Y and N.

freightTerms

No

String (30)

Indicator that references what freight terms are related to the order.

backhaulType

No

String (6)

This field contains the type of backhaul allowance that will be applied to the order. Some examples are Calculated or Flat rate.

backhaulAllowance

No

Number (20,4)

This field will contain the backhaul allowance value.

shipPayMethod

No

String (2)

Code indicating the payment terms for freight charges associated with the order. Valid values include: CC - Collect, CF - Collect Freight Credited Back to Customer, DF - Defined by Buyer and Seller, MX - Mixed, PC - Prepaid but Charged to Customer, PO - Prepaid Only, PP - Prepaid by Seller.

transportationResponsibilityType

No

String (2)

Contains the code indicating the type of location or point at which the responsibility for transportation transfers from the seller/supplier to the buyer/retailer. Valid values are found under the FOBT code type. Examples are City and State (AC), Country Of Sourcing (CA) and Country (CC).

transportationResponsibility

No

String (250)

Contains the description of the location or point at which the responsibility for transportation transfers from the seller/supplier to the buyer/retailer.

vendorOrderNo

No

String (15)

Contains the vendors unique identifying number for an order. These orders may have originated by the vendor through the EDI process or this number can be associated to a Oracle Retail order when the order is created on-line.

freightContractNo

No

String (10)

The number of the contract with a shipper that will give specific freight rates. This field is only available when the system is running Import functionality.

pickupLocation

No

String (250)

Contains the location at which the order will be picked up, if the order is a Pickup order.

pickupNo

No

String (25)

Contains the reference number of the Pickup order.

pickupDate

No

date

Contains the date when the order can be picked up from the Supplier. This field is only required if the Purchase Type of the order is Pickup.

appointmentDateTime

No

date-time

This column will hold the date and time of the receiving appointment at the warehouse.

importType

No

String (1)

Valid values are IMporter and EXporter. This is the default importer/exporter assigned to the supplier of the Puchase order.

importId

No

Number (10)

This identifies the importer/exporter assigned to the supplier. This should reference the WH. WH folumn with foreign key created.

clearingZoneId

No

String (5)

This column will hold the clearing zone id.

routingLocation

No

String (5)

This is the default routing location for the import order. FK on OUTLOC. OUTLOC_ID.

reApproveInd

No

String (1)

This field indicates that the update to the corresponding purchase order needs to be performed, and then it should be approved again. Valid values are Y and N.

earliestShipDate

No

date

The date before which the item can not be shipped by the supplier.

latestShipDate

No

date

The date after which the item can not be shipped by the supplier.

customFlexAttribute

No

Collection of Object

References a collection of custom flexible attributes at the order header level. This collection is treated as a single group and should include all named flexible attributes for the business entity. If any configured named attribute is missing from the input collection, its value will be set to NULL.

hts

No

Collection of Object

References the HTS code associated with a particular item of the purchase order.

Table 5-1346 CustomFlexAttribute - Object. See list of elements for detail

Element Name Required Data Type Description

name

Yes

String (30)

Holds the attribute name.

value

No

String (250)

Holds the numeric or string value of the attribute.

valueDate

No

date

Holds the date value of the attribute.

Table 5-1347 Hts - Object. See list of elements for detail

Element Name Required Data Type Description

item

Yes

String (25)

This field contains an unique alphanumeric value that identifies the item.

packItem

No

String (25)

This field contains alphanumeric value that uniquely identifies the pack.

hts

Yes

String (25)

This field contains an identifier for the Harmonized Tariff Schedule code.

status

Yes

String (1)

This field contains a flag to indicate the status of the Purchase Order/Item/HTS relationship. Valid values are (W)orksheet and (A)pproved.

originCountry

Yes

String (3)

This field contains the country of manufacture when the HTS tracking level is M. When the HTS tracking level is S, this stores the country of sourcing.

importCountry

No

String (3)

This field contains the country that the item will be imported in to.

assessments

No

Collection of Object

References the HTS code assessments associated with a particular item of the purchase order.

Table 5-1348 Assessments - Object. See list of elements for detail

Element Name Required Data Type Description

component

Yes

String (10)

This field contains a user specified code representing the specific assessment component found on the ELC_COMP table.

computationValueBase

No

String (10)

This field contains a code representing the base value for calculating the assessment.

componentRate

Yes

Number (20,4)

This field contains the rate to be charged against the calculation base. This field will hold a percentage value if the Calculation Basis of the Component is Value or a monetary amount in the currency defined for the assessment (usually the import country's currency) if the Calculation Basis is Specific.

perCount

No

Number (12,4)

This field contains a count indicating the amount of the Per Count Unit of Measure to which the rate applies. When creating an expense that is defined as $. 20 for every 10 kilograms of an item ordered, the Per Count would be 10.

perCountUom

No

String (4)

This field contains the unit of measure in which the Per Count is specified. When creating an expense that is defined as $. 20 for every 10 kilograms of an item ordered, the Per Count UOM would be the Unit of Measure code for Kilograms.

nominationFlag1

Yes

String (1)

This field contains a flag that is used to indicate if the value of the cost component should be included in the calculation of another. Nomination flags are used to calculate the value of a Computation Value Base (CVB) which has the corresponding nomination flag set to Yes (Y). Valid values are: N/A (N) (the value of this component will not be included in CVBs which look at Nomination Flag 1), Add (+) (the value of this component will be added to CVBs which look at Nomination Flag 1), and Subtract (-) (the value of this component will be deducted from CVBs which look at Nomination Flag 1). For example, if cost component ABC has a + in Nomination Flag 1, then all CVBs that include Nomination Flag 1 will include this cost component value in their calculation basis.

inDuty

Yes

String (1)

If Import Management is enabled in Merchandising (i. e. system_options. import_ind = Y), the inDuty flag is used to indicate if the value of the cost component should be included in total duty.

nominationFlag3

Yes

String (1)

This field contains a flag that is used to indicate if the value of the cost component should be included in the calculation of another. Nomination flags are used to calculate the value of a Computation Value Base (CVB) which has the corresponding nomination flag set to Yes (Y). Valid values are: N/A (N) (the value of this component will not be included in CVBs which look at Nomination Flag 3), Add (+) (the value of this component will be added to CVBs which look at Nomination Flag 3), and Subtract (-) (the value of this component will be deducted from CVBs which look at Nomination Flag 3). For example, if cost component ABC has a + in Nomination Flag 3, then all CVBs that include Nomination Flag 3 will include this cost component value in their calculation basis.

inExpense

Yes

String (1)

The inExpense flag is used to indicate if the value of the cost component should be included in total expenses.

inAlc

Yes

String (1)

The inALC flag is used for cost components where the retailer does not expect to receive an actual value for the charge via an obligation or customs entry. The inALC flag allows the value of the cost component to be included in ALC via direct nomination and indicates to the system that the estimated value on the order should be used as the actual value as well because no other actual will be provided.

Sample Input Message

{
  "collectionSize": 1,
  "items": [
    {
      "orderNo": 464690012,
      "supplier": 2400,
      "currencyCode": "USD",
      "terms": "02",
      "notBeforeDate": "2001-12-31",
      "notAfterDate": "2001-12-31",
      "otbEowDate": "2001-12-31",
      "dept": null,
      "status": "A",
      "includeOnOrderInd": "Y",
      "writtenDate": "2001-12-31",
      "origin": "2",
      "ediPoInd": "Y",
      "preMarkInd": "Y",
      "approvedBy": null,
      "commentDesc": "Create Order",
      "dataLoadingDestination": "RMS",
      "masterOrderNo": null,
      "ladingPort": "7",
      "dischargePort": "480",
      "factory": "100",
      "agent": "007",
      "shipMethod": "32",
      "partnerType1": "AG",
      "partner1": "007",
      "partnerType2": "E",
      "partner2": "4678",
      "partnerType3": null,
      "partner3": null,
      "importCountry": "US",
      "purchaseType": "FOB",
      "paymentMethod": "LC",
      "titlePassLocationType": "FF",
      "titlePassLocation": "US",
      "purchaseOrderType": "4000",
      "orderType": "N/B",
      "buyer": 1000,
      "location": null,
      "locationType": null,
      "promotion": 41,
      "qualityControlInd": "Y",
      "freightTerms": "03",
      "backhaulType": null,
      "backhaulAllowance": null,
      "shipPayMethod": "PO",
      "transportationResponsibilityType": "FF",
      "transportationResponsibility": "US",
      "vendorOrderNo": "9987001",
      "freightContractNo": "111",
      "pickupLocation": null,
      "pickupNo": null,
      "pickupDate": null,
      "appointmentDateTime": "2001-12-31T23:59:59.123Z",
      "importType": "W",
      "importId": 10001,
      "clearingZoneId": null,
      "routingLocation": null,
      "reApproveInd": null,
      "earliestShipDate": "2001-12-31",
      "latestShipDate": "2001-12-31",
      "customFlexAttribute": [
        {
          "name": "REVIEW_DATE",
          "value": null,
          "valueDate": "2001-12-31"
        }
      ],
      "hts": [
        {
          "item": "103900095",
          "packItem": null,
          "hts": "9014111112",
          "status": "W",
          "originCountry": "IN",
          "importCountry": "US",
          "assessments": [
            {
              "component": "DTYCAUS",
              "computationValueBase": null,
              "componentRate": 12,
              "perCount": 1,
              "perCountUom": "EA",
              "nominationFlag1": "N",
              "inDuty": "+",
              "nominationFlag3": "-",
              "inExpense": "N",
              "inAlc": "N"
            }
          ]
        }
      ]
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Create Purchase Order Letters of Credit

Functional Area

Purchase Orders

Business Overview

This webservice is used to create letter of credit information within Merchandising when the order payment type is Letter of Credit in order to keep it in sync with an external system that is responsible for maintaining purchase orders. It also updates order header information with the values provided in the request if the order has not yet been submitted or approved. For an existing order that has a payment type of Letter of Credit, the modification of header level order information is not necessary; however header level fields, particularly the payment type can be updated in case a letter of credit needs to be attached to the worksheet order that has an existing payment type other than Letter of Credit. Internally, the service sets the status of the order to Worksheet in order to accommodate the modification of letter of credit information for purchase orders in the system that have been submitted or approved. Validation of updated information is performed before automatic order re-approval is attempted.

For more details on Purchase Orders, see the Create Purchase Order service description.

Service Type

POST

ReST URL
MerchIntegrations/services/purchaseOrder/lettersOfCredit/create
Input Payload Details

Table 5-1349 Create - Object. See list of elements for detail

Element Name Required Data Type Description

collectionSize

Yes

Number (4)

Number of items in the collection.

items

Yes

Collection of Object

References a collection of letter of credit records.

Table 5-1350 Items - Object. See list of elements for detail

Element Name Required Data Type Description

orderNo

Yes

Number (12)

The unique identifier for the order.

supplier

No

Number (10)

The identifier of the supplier from which the order will be sourced. This cannot be modified if details exist for the PO.

currencyCode

No

String (3)

The code of the order's currency. If not populated, the supplier's currency will be used. This field can be modified if the order status is worksheet or approved and the order has not been shipped.

terms

No

String (15)

The sales terms of the order. If not populated on the create message, will default to the supplier's terms. This can be modified in worksheet or approved status.

notBeforeDate

No

date

The first date that delivery will be accepted. This can be modified in worksheet or approved status.

notAfterDate

No

date

The last date that delivery will be accepted. This can be modified in worksheet or approved status.

otbEowDate

No

date

The end of week date of the OTB bucket used. This can be modified in worksheet or approved status.

dept

No

Number (4)

The department in which are all the items on the order. This field is required if the system enforces single department ordering. This cannot be modified if details exist for the PO.

status

No

String (1)

The code for the status of the order. Valid values are 'W' worksheet and 'A' approved for PO creation. It is also possible to modify the status to 'C' closed.

includeOnOrderInd

No

String (1)

Indicates if the order should be included in on-order calculations. This can be modified in worksheet or approved status. Valid values are Y and N.

writtenDate

No

date

The date the order was created. If this field is not populated on the message it will default to the time of creation in RMS. It cannot be modified.

origin

No

String (2)

Indicates where the order originated. Valid values include: 2 - Manual, 6 - AIP generated order, 7 , 8, 12 - Consignment Vendor Order.

ediPoInd

No

String (1)

Indicates whether or not the order will be transmitted to the supplier via an Electronic Data Exchange transaction. Valid values are: Y = Submit via EDI, N = Do not use EDI.

preMarkInd

No

String (1)

This field indicated whether or not a supplier has agreed to break an order into separate boxes so that the boxes can be sent directly to stores. Valid values are Y and N.

approvedBy

No

String (254)

Indicates where the order was approved. It will be the user ID of the person approving the order.

commentDesc

No

String (2000)

Any comments pertaining to the order.

dataLoadingDestination

No

String (6)

This field indicates if the order will be created in RMS or the staging tables. Valid values are RMS or STG. If not defined, the default is STG.

masterOrderNo

No

Number (12)

This field indicates the master order number from which child records were created.

ladingPort

No

String (5)

This field indicates the port from which the items on the purchase order are shipped.

dischargePort

No

String (5)

This field indicates the port at which the items on the purchase order will enter the country of import.

factory

No

String (10)

This field indicates the factory at which the items on the purchase order are made.

agent

No

String (10)

This field indicates the agent that is used in the purchase of the items on the purchase order.

shipMethod

No

String (6)

This field indicates the method used to ship the items on the purchase order from the country of origin to the country of import.

partnerType1

No

String (6)

This field indicates Partner 1 Type.

partner1

No

String (10)

This field indicates the Additional Partner 1.

partnerType2

No

String (6)

This field indicates Partner 2 Type.

partner2

No

String (10)

This field indicates the Additional Partner 2.

partnerType3

No

String (6)

This field indicates Partner 3 Type.

partner3

No

String (10)

This field indicates the Additional Partner 3.

importCountry

No

String (3)

The identifier of the country into which the items on the order are being imported.

purchaseType

No

String (6)

This field indicates whats included in the suppliers cost of the item. Valid values include C (Cost), CI (Cost and Insurance), CIF (Cost, Insurance and Freight) and FOB (Free on Board).

paymentMethod

No

String (6)

This field indicates the default method for how purchase orders for this site will be paid. Valid values are in the code type PYMT(Payment Method). Examples are Open Account(OA), Letter of Credit(LC) and Wire Transfer(WT).

titlePassLocationType

No

String (2)

Contains the code indicating the type of location or point where ownership of merchandise changes hands from seller/supplier to buyer/retailer. Valid values are found under the FOBT code type. Examples are City and State (AC), Country Of Sourcing (CA) and City (CI).

titlePassLocation

No

String (250)

Contains the description of the location or point where ownership of merchandise changes hands from seller/supplier to buyer/retailer.

purchaseOrderType

No

String (4)

This field contains the value associated with the PO_TYPE for the order.

orderType

No

String (3)

Indicates the type of order and which Open To Buy bucket will be updated. Valid values include: N/B - Non Basic, ARB - Automatic Reorder of Basic, BRB - Buyer Reorder of Basic, DSD - Direct Store Delivery

buyer

No

Number (4)

Contains the number associated with the buyer for the order.

location

No

Number (10)

This field contains the location all items on the order will be delivered to if populated. i. e. It will mean a single location order.

locationType

No

String (1)

This field contains the type of location in the location field. Valid values are: Valid values are S (Store) or W (Warehouse).

promotion

No

Number (10)

Contains the RPCS offer ID associated with the order to provide a link between the order dialog and the promotions dialog.

qualityControlInd

No

String (1)

Determines whether or not quality control will be required when items for this order are received. Valid values are Y and N.

freightTerms

No

String (30)

Indicator that references what freight terms are related to the order.

backhaulType

No

String (6)

This field contains the type of backhaul allowance that will be applied to the order. Some examples are Calculated or Flat rate.

backhaulAllowance

No

Number (20,4)

This field will contain the backhaul allowance value.

shipPayMethod

No

String (2)

Code indicating the payment terms for freight charges associated with the order. Valid values include: CC - Collect, CF - Collect Freight Credited Back to Customer, DF - Defined by Buyer and Seller, MX - Mixed, PC - Prepaid but Charged to Customer, PO - Prepaid Only, PP - Prepaid by Seller.

transportationResponsibilityType

No

String (2)

Contains the code indicating the type of location or point at which the responsibility for transportation transfers from the seller/supplier to the buyer/retailer. Valid values are found under the FOBT code type. Examples are City and State (AC), Country Of Sourcing (CA) and Country (CC).

transportationResponsibility

No

String (250)

Contains the description of the location or point at which the responsibility for transportation transfers from the seller/supplier to the buyer/retailer.

vendorOrderNo

No

String (15)

Contains the vendors unique identifying number for an order. These orders may have originated by the vendor through the EDI process or this number can be associated to a Oracle Retail order when the order is created on-line.

freightContractNo

No

String (10)

The number of the contract with a shipper that will give specific freight rates. This field is only available when the system is running Import functionality.

pickupLocation

No

String (250)

Contains the location at which the order will be picked up, if the order is a Pickup order.

pickupNo

No

String (25)

Contains the reference number of the Pickup order.

pickupDate

No

date

Contains the date when the order can be picked up from the Supplier. This field is only required if the Purchase Type of the order is Pickup.

appointmentDateTime

No

date-time

This column will hold the date and time of the receiving appointment at the warehouse.

importType

No

String (1)

Valid values are IMporter and EXporter. This is the default importer/exporter assigned to the supplier of the Puchase order.

importId

No

Number (10)

This identifies the importer/exporter assigned to the supplier. This should reference the WH. WH folumn with foreign key created.

clearingZoneId

No

String (5)

This column will hold the clearing zone id.

routingLocation

No

String (5)

This is the default routing location for the import order. FK on OUTLOC. OUTLOC_ID.

reApproveInd

No

String (1)

This field indicates that the update to the corresponding purchase order needs to be performed, and then it should be approved again. Valid values are Y and N.

earliestShipDate

No

date

The date before which the item can not be shipped by the supplier.

latestShipDate

No

date

The date after which the item can not be shipped by the supplier.

customFlexAttribute

No

Collection of Object

References a collection of custom flexible attributes at the order header level. This collection is treated as a single group and should include all named flexible attributes for the business entity. If any configured named attribute is missing from the input collection, its value will be set to NULL.

letterOfCredit

No

Record

References the letter of credit for the purchase order.

Table 5-1351 CustomFlexAttribute - Object. See list of elements for detail

Element Name Required Data Type Description

name

Yes

String (30)

Holds the attribute name.

value

No

String (250)

Holds the numeric or string value of the attribute.

valueDate

No

date

Holds the date value of the attribute.

Table 5-1352 LetterOfCredit - Object. See list of elements for detail

Element Name Required Data Type Description

lcReferenceId

No

Number (8)

This field contains the ID of the LC to which the order is attached.

lcGroupId

No

String (10)

This field contains an ID that can be used to group Orders together so that they can be attached to a single Letter of Credit.

applicant

Yes

String (10)

This field contains the ID of the applicant being used for the LC process.

beneficiary

Yes

Number (10)

This field contains the ID of the beneficiary being used for the LC process.

merchandiseDescription

Yes

String (2000)

This field holds a description of the merchandise on the order.

transshipmentInd

Yes

String (1)

This field indicates whether or not the LC to which the order is attached will allow the order to be transshipped. Valid values are 'Y'es and 'N'o.

partialShipmentInd

Yes

String (1)

This field indicates whether or not the LC to which the order is attached will allow the order to be partially shipped. Valid values are 'Y'es and 'N'o.

lcAttachedInd

Yes

String (1)

This field indicates whether or not the order has been attached to a Letter of Credit. Valid values are Y and N.

Sample Input Message

{
  "collectionSize": 1,
  "items": [
    {
      "orderNo": 464690012,
      "supplier": 2400,
      "currencyCode": "USD",
      "terms": "02",
      "notBeforeDate": "2001-12-31",
      "notAfterDate": "2001-12-31",
      "otbEowDate": "2001-12-31",
      "dept": null,
      "status": "A",
      "includeOnOrderInd": "Y",
      "writtenDate": "2001-12-31",
      "origin": "2",
      "ediPoInd": "Y",
      "preMarkInd": "Y",
      "approvedBy": "RMS_ADMIN",
      "commentDesc": "Create Order",
      "dataLoadingDestination": "RMS",
      "masterOrderNo": null,
      "ladingPort": "7",
      "dischargePort": "480",
      "factory": "100",
      "agent": "007",
      "shipMethod": "32",
      "partnerType1": "AG",
      "partner1": "007",
      "partnerType2": "E",
      "partner2": "4678",
      "partnerType3": null,
      "partner3": null,
      "importCountry": "US",
      "purchaseType": "FOB",
      "paymentMethod": "LC",
      "titlePassLocationType": "FF",
      "titlePassLocation": "US",
      "purchaseOrderType": "4000",
      "orderType": "N/B",
      "buyer": 1000,
      "location": null,
      "locationType": null,
      "promotion": 41,
      "qualityControlInd": "Y",
      "freightTerms": "03",
      "backhaulType": null,
      "backhaulAllowance": null,
      "shipPayMethod": "PO",
      "transportationResponsibilityType": "FF",
      "transportationResponsibility": "US",
      "vendorOrderNo": "9987001",
      "freightContractNo": "111",
      "pickupLocation": null,
      "pickupNo": null,
      "pickupDate": null,
      "appointmentDateTime": "2001-12-31T23:59:59.123Z",
      "importType": "W",
      "importId": 10001,
      "clearingZoneId": null,
      "routingLocation": null,
      "reApproveInd": null,
      "earliestShipDate": "2001-12-31",
      "latestShipDate": "2001-12-31",
      "customFlexAttribute": [
        {
          "name": "REVIEW_DATE",
          "value": null,
          "valueDate": "2001-12-31"
        }
      ],
      "letterOfCredit": {
        "lcReferenceId": 10015000,
        "lcGroupId": null,
        "applicant": "500",
        "beneficiary": 2400,
        "merchandiseDescription": "Bath Essentials",
        "transshipmentInd": "Y",
        "partialShipmentInd": "Y",
        "lcAttachedInd": "Y"
      }
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Create Purchase Orders

Functional Area

Purchase Orders

Business Overview

This webservice is used to create purchase orders in order to keep Merchandising in sync with an external system that is responsible for maintaining purchase orders. It creates orders in Worksheet, Approved or Closed status. It also creates other data associated with a purchase order, including letter of credit, expenses, harmonized tariff schedules (HTS) and assessments, and custom flex attributes (CFAS). It also will apply rounding rules, default inventory management parameters, apply bracket costs, update open to buy buckets, and insert a record into the deals queue for deals to be applied to the order, if applicable. If the location specified on a purchase order is a franchise store, a corresponding franchise order is also created along with the PO.

It is assumed that the source of the orders sent in this service is not the supplier, as vendor managed inventory (VMI) POs can be sent using the Upload Purchase Order and Purchase Order Change Acknowledgements from Suppliers to Merchandising (ediupack) batch upload. It also does not support creating customer order POs or contract POs. Customer order POs are assumed to be sent using the Customer Order Fulfillment Subscription API and contract orders are created using replenishment processes in Merchandising or manually using the UI.

Service Type

POST

ReST URL
MerchIntegrations/services/purchaseOrders/create
Input Payload Details

Table 5-1353 Create - Object. See list of elements for detail

Element Name Required Data Type Description

items

Yes

Collection of Object

Collection of orders.

Table 5-1354 Items - Object. See list of elements for detail

Element Name Required Data Type Description

orderNo

Yes

Number (12)

The unique identifier for the order.

supplier

No

Number (10)

The identifier of the supplier from which the order will be sourced. This cannot be modified if details exist for the PO.

currencyCode

No

String (3)

The code of the order's currency. If this is not populated, the supplier's currency will be used. This field can be modified if the order status is worksheet or approved and the order has not been shipped.

terms

No

String (15)

The sales terms of the order. If this is not populated on the create message, will default to the supplier's terms. This can be modified in worksheet or approved status.

notBeforeDate

No

date

The first date that delivery will be accepted. This can be modified in worksheet or approved status.

notAfterDate

No

date

The last date that delivery will be accepted. This can be modified in worksheet or approved status.

otbEowDate

No

date

The end of week date of the OTB bucket used. This can be modified in worksheet or approved status.

dept

No

Number (4)

The department in which are all the items on the order. This field is required if the system enforces single department ordering. This cannot be modified if details exist for the PO.

status

No

String (1)

The code for the status of the order. Valid values are 'W' worksheet and 'A' approved for PO creation. It is also possible to modify the status to 'C' closed.

exchangeRate

No

Number (20,10)

The rate of exchange for the PO used between the order and primary currencies. This field can be modified if the order status is worksheet or approved and the order has not been shipped.

includeOnOrderInd

No

String (1)

Indicates if the order should be included in on-order calculations. This can be modified in worksheet or approved status. Valid values are Y and N.

writtenDate

No

date

The date the order was created. If this field is not populated on the message it will default to the time of creation in RMS. It cannot be modified.

origin

No

String (2)

Indicates where the order originated. Valid values include: 2 - Manual, 6 - AIP generated order, 7 , 8, 12 - Consignment Vendor Order.

ediPoInd

No

String (1)

Indicates whether or not the order will be transmitted to the supplier via an Electronic Data Exchange transaction. Valid values are: Y = Submit via EDI, N = Do not use EDI.

preMarkInd

No

String (1)

This field indicated whether or not a supplier has agreed to break an order into separate boxes so that the boxes can be sent directly to stores. Valid values are Y and N.

approvedBy

No

String (254)

Indicates where the order was approved. It will be the user ID of the person approving the order.

commentDesc

No

String (2000)

Any comments pertaining to the order.

dataLoadingDestination

No

String (6)

This field indicates if the order will be created in RMS or the staging tables. Valid values are RMS or STG. If this is not defined, the default is STG.

masterOrderNo

No

Number (12)

This field indicates the master order number from which child records were created.

ladingPort

No

String (5)

This field indicates the port from which the items on the purchase order are shipped.

dischargePort

No

String (5)

This field indicates the port at which the items on the purchase order will enter the country of import.

factory

No

String (10)

This field indicates the factory at which the items on the purchase order are made.

agent

No

String (10)

This field indicates the agent that is used in the purchase of the items on the purchase order.

shipMethod

No

String (6)

This field indicates the method used to ship the items on the purchase order from the country of origin to the country of import.

partnerType1

No

String (6)

This field indicates Partner 1 Type.

partner1

No

String (10)

This field indicates the Additional Partner 1.

partnerType2

No

String (6)

This field indicates Partner 2 Type.

partner2

No

String (10)

This field indicates the Additional Partner 2.

partnerType3

No

String (6)

This field indicates Partner 3 Type.

partner3

No

String (10)

This field indicates the Additional Partner 3.

importCountry

No

String (3)

The identifier of the country into which the items on the order are being imported.

purchaseType

No

String (6)

This field indicates what is included in the suppliers cost of the item. Valid values include C (Cost), CI (Cost and Insurance), CIF (Cost, Insurance and Freight) and FOB (Free on Board).

paymentMethod

No

String (6)

This field indicates the default method for how purchase orders for this site will be paid. Valid values are in the code type PYMT(Payment Method). Examples are Open Account(OA), Letter of Credit(LC) and Wire Transfer(WT).

titlePassLocationType

No

String (2)

Contains the code indicating the type of location or point where ownership of merchandise changes hands from seller/supplier to buyer/retailer. Valid values are found under the FOBT code type. Examples are City and State (AC), Country Of Sourcing (CA) and City (CI).

titlePassLocation

No

String (250)

Contains the description of the location or point where ownership of merchandise changes hands from seller/supplier to buyer/retailer.

purchaseOrderType

No

String (4)

This field contains the value associated with the PO_TYPE for the order.

orderType

No

String (3)

Indicates the type of order and which Open To Buy bucket will be updated. Valid values include: N/B - Non Basic, ARB - Automatic Reorder of Basic, BRB - Buyer Reorder of Basic, DSD - Direct Store Delivery

buyer

No

Number (4)

Contains the number associated with the buyer for the order.

location

No

Number (10)

This field contains the location all items on the order will be delivered to if populated. i. e. It will mean a single location order.

locationType

No

String (1)

This field contains the type of location in the location field. Valid values are: Valid values are S (Store) or W (Warehouse).

promotion

No

Number (10)

Contains the RPCS offer ID associated with the order to provide a link between the order dialog and the promotions dialog.

qualityControlInd

No

String (1)

Determines whether or not quality control will be required when items for this order are received. Valid values are Y and N.

freightTerms

No

String (30)

Indicator that references what freight terms are related to the order.

backhaulType

No

String (6)

This field contains the type of backhaul allowance that will be applied to the order. Some examples are Calculated or Flat rate.

backhaulAllowance

No

Number (20,4)

This field will contain the backhaul allowance value.

shipPayMethod

No

String (2)

Code indicating the payment terms for freight charges associated with the order. Valid values include: CC - Collect, CF - Collect Freight Credited Back to Customer, DF - Defined by Buyer and Seller, MX - Mixed, PC - Prepaid but Charged to Customer, PO - Prepaid Only, PP - Prepaid by Seller.

transportationResponsibilityType

No

String (2)

Contains the code indicating the type of location or point at which the responsibility for transportation transfers from the seller/supplier to the buyer/retailer. Valid values are found under the FOBT code type. Examples are City and State (AC), Country Of Sourcing (CA) and Country (CC).

transportationResponsibility

No

String (250)

Contains the description of the location or point at which the responsibility for transportation transfers from the seller/supplier to the buyer/retailer.

vendorOrderNo

No

String (15)

Contains the vendors unique identifying number for an order. These orders may have originated by the vendor through the EDI process or this number can be associated to an Oracle Retail order when the order is created on-line.

freightContractNo

No

String (10)

The number of the contract with a shipper that will give specific freight rates. This field is only available when the system is running Import functionality.

pickupLocation

No

String (250)

Contains the location at which the order will be picked up, if the order is a Pickup order.

pickupNo

No

String (25)

Contains the reference number of the Pickup order.

pickupDate

No

date

Contains the date when the order can be picked up from the Supplier. This field is only required if the Purchase Type of the order is Pickup.

appointmentDateTime

No

date-time

This column will hold the date and time of the receiving appointment at the warehouse.

importType

No

String (1)

Valid values are IMporter and EXporter. This is the default importer/exporter assigned to the supplier of the Purchase order.

importId

No

Number (10)

This identifies the importer/exporter assigned to the supplier. This should reference the WH. WH column with foreign key created.

clearingZoneId

No

String (5)

This column will hold the clearing zone id.

routingLocation

No

String (5)

This is the default routing location for the import order. FK on OUTLOC. OUTLOC_ID.

reApproveInd

No

String (1)

This field indicates that the update to the corresponding purchase order needs to be performed, and then it should be approved again. Valid values are Y and N.

earliestShipDate

No

date

The date before which the item can not be shipped by the supplier.

latestShipDate

No

date

The date after which the item can not be shipped by the supplier.

fileId

No

String (20)

In order to support supplier pooling via the buyer worksheet, the recommended order quantities for the individual suppliers are linked together for logistical purposes while generating orders from the worksheet based on this identifier.

customFlexAttribute

No

Collection of Object

References a collection of custom flexible attributes at the order header level. This collection is treated as a single group and should include all named flexible attributes for the business entity. If any configured named attribute is missing from the input collection, its value will be set to NULL.

details

No

Collection of Object

This references the order detail node.

itemDetails

No

Collection of Object

This references the collection of items in the order.

letterOfCredit

No

Record

References the letter of credit for the purchase order.

expenses

No

Collection of Object

References the expense associated with a particular item/location of the purchase order.

hts

No

Collection of Object

References the HTS code associated with a particular item of the purchase order.

Table 5-1355 Details - Object. See list of elements for detail

Element Name Required Data Type Description

item

No

String (25)

An approved, transaction level item. If a pack, it must be an orderable pack (with an order_as_type of 'P'). This is required if the ref_item field is not populated. An item/location may be added to the order in worksheet or approved status.

location

Yes

Number (10)

An active store or warehouse. If multichannel is on, and a warehouse is being order to, a virtual warehouse is expected. An item/location may be added to the order in worksheet or approved status.

locationType

No

String (1)

The location type of the location. Valid values are 'S' store and 'W' warehouse. This field cannot be modified.

unitCost

No

Number (20,4)

The cost of the item from the supplier in the order's currency. This can be modified if the status is worksheet or approved, but not if any portion of the item's order quantity is in transit or has been received. If it is not specified on the message, it will default from the item supplier cost for this location.

referenceItem

No

String (25)

The id of a reference item which can be used instead of using the item field. If the item field is not populated this field is required. A ref item/location may be added to the order in worksheet or approved status.

originCountry

No

String (3)

The identifier of the country from which the item is being sourced. This field cannot be modified.

supplierPackSize

No

Number (12,4)

The supplier pack size for the item on the order. This may be updated in worksheet or approved status.

quantityOrdered

No

Number (12,4)

The quantity ordered of item. This can be updated in worksheet or approved status to adjust the quantity of an item/location or cancel an item/location from the order.

cancelInd

No

String (1)

Indicates if the detail record's quantity should be cancelled. Valid values are 'Y'es and 'N'o.

reinstateInd

No

String (1)

Indicates if a detail record which was previously cancelled should be reinstated. This will reinstate in the order quantity the amount in the cancelled bucket. Valid values are 'Y'es and 'N'o.

deliveryDate

No

date

The date by which goods are to be delivered. There can be multiple item-locations on the order with different delivery dates.

quantityCancelled

No

Number (12,4)

This field contains the quantity that was left to be ordered when the line item was cancelled.

cancelCode

No

String (1)

This field contains the reason that the line item was cancelled. This field is required if a line item is cancelled.

estimatedInstockDate

No

date

Date that the item on the PO is expected to be available to ship from the PO location to another location. It is calculated as the Order Creation or Approval Date + Supplier Lead Time + Transit Days between the Supplier and the PO/location + Item/Warehouse Inbound Handling Days (if PO location is a warehouse).

earliestShipDate

No

date

The date before which the item can not be shipped by the supplier.

latestShipDate

No

date

The date after which the item can not be shipped by the supplier.

customFlexAttribute

No

Collection of Object

References a collection of custom flexible attributes at the order header level. This collection is treated as a single group and should include all named flexible attributes for the business entity. If any configured named attribute is missing from the input collection, its value will be set to NULL.

Table 5-1356 CustomFlexAttribute - Object. See list of elements for detail

Element Name Required Data Type Description

name

Yes

String (30)

Holds the attribute name.

value

No

String (250)

Holds the numeric or string value of the attribute.

valueDate

No

date

Holds the date value of the attribute.

Table 5-1357 ItemDetails - Object. See list of elements for detail

Element Name Required Data Type Description

item

No

String (25)

An approved, transaction level item. If a pack, it must be an orderable pack (with an order_as_type of 'P'). This is required if the ref_item field is not populated. An item/location may be added to the order in worksheet or approved status.

customFlexAttribute

No

Collection of Object

References a collection of custom flexible attributes. This collection is treated as a single group and should include all named flexible attributes for the business entity. If any configured, named attribute is missing from the input collection, its value will be set to NULL.

Table 5-1358 LetterOfCredit - Object. See list of elements for detail

Element Name Required Data Type Description

lcReferenceId

No

Number (8)

This field contains the ID of the LC to which the order is attached.

lcGroupId

No

String (10)

This field contains an ID that can be used to group Orders together so that they can be attached to a single Letter of Credit.

applicant

Yes

String (10)

This field contains the ID of the applicant being used for the LC process.

beneficiary

Yes

Number (10)

This field contains the ID of the beneficiary being used for the LC process.

merchandiseDescription

Yes

String (2000)

This field holds a description of the merchandise on the order.

transshipmentInd

Yes

String (1)

This field indicates whether or not the LC to which the order is attached will allow the order to be transshipped. Valid values are 'Y'es and 'N'o.

partialShipmentInd

Yes

String (1)

This field indicates whether or not the LC to which the order is attached will allow the order to be partially shipped. Valid values are 'Y'es and 'N'o.

lcAttachedInd

Yes

String (1)

This field indicates whether or not the order has been attached to a Letter of Credit. Valid values are Y and N.

Table 5-1359 Expenses - Object. See list of elements for detail

Element Name Required Data Type Description

item

Yes

String (25)

This field contains alphanumeric value that uniquely identifies the item.

packItem

No

String (25)

This field contains alphanumeric value that uniquely identifies the pack.

location

Yes

Number (10)

This field contains the location that item will be ordered to. This field may contain a store or a warehouse.

locationType

Yes

String (1)

This field contains the type of location in the location field. Valid values are: S - Store W - Warehouse.

component

Yes

String (10)

This field contains a user specified code representing a specific expense found on the ELC_COMP table.

computationValueBase

No

String (10)

This field contains a code representing the base value for calculating the expense.

calculationBasis

No

String (1)

This field contains the basis the expense will be calculated against if there is no CVB code attached to the expense. Valid values are S (Supplier) or O (Order). If the Cost Basis is S then when calculating the expense, the items supplier cost will be used. If the Cost Basis is O then the order unit cost of the item on the order will be used to calculate the expense. The code type for this field is EXCB.

componentRate

Yes

Number (20,4)

This field contains the rate to be charged against the calculation base of the component (either value or specific).

componentCurrency

Yes

String (3)

This field contains the currency the expense or assessment is to be entered in. If the Calculation Basis is V (Value), then comp_currency will be NULL.

exchangeRate

No

Number (20,10)

This field contains the exchange rate of the individual expense.

perCount

No

Number (12,4)

This field contains a count indicating the amount of the Per Count Unit of Measure to which the rate applies. When creating an expense that is defined as $. 20 for every 10 kilograms of an item ordered, the Per Count would be 10.

perCountUom

No

String (4)

This field contains the unit of measure in which the Per Count is specified. When creating an expense that is defined as $. 20 for every 10 kilograms of an item ordered, the Per Count UOM would be the Unit of Measure code for Kilograms.

nominationFlag1

Yes

String (1)

This field contains a flag that is used to indicate if the value of the cost component should be included in the calculation of another. Nomination flags are used to calculate the value of a Computation Value Base (CVB) which has the corresponding nomination flag set to Yes (Y). Valid values are: N/A (N) (the value of this component will not be included in CVBs which look at Nomination Flag 1), Add (+) (the value of this component will be added to CVBs which look at Nomination Flag 1), and Subtract (-) (the value of this component will be deducted from CVBs which look at Nomination Flag 1). For example, if cost component ABC has a + in Nomination Flag 1, then all CVBs that include Nomination Flag 1 will include this cost component value in their calculation basis.

inDuty

Yes

String (1)

See description for nom_flag_1. If ALC is turned on (i. e. system_options. import_ind = Y), nom_flag_2 is used to indicate the status of a component in duty calculation nom_flag_4 is used to indicate the status of a component in ELC calculation nom_flag_5 is used to indicate the status of a component in ALC calculation i. e. these 3 flags can not be used for any other purposes if ALC is turned on.

nominationFlag3

Yes

String (1)

This field contains a flag that is used to indicate if the value of the cost component should be included in the calculation of another. Nomination flags are used to calculate the value of a Computation Value Base (CVB) which has the corresponding nomination flag set to Yes (Y). Valid values are: N/A (N) (the value of this component will not be included in CVBs which look at Nomination Flag 3), Add (+) (the value of this component will be added to CVBs which look at Nomination Flag 3), and Subtract (-) (the value of this component will be deducted from CVBs which look at Nomination Flag 3). For example, if cost component ABC has a + in Nomination Flag 3, then all CVBs that include Nomination Flag 3 will include this cost component value in their calculation basis.

inExpense

Yes

String (1)

See description for nom_flag_1. If ALC is turned on (i. e. system_options. import_ind = Y), nom_flag_2 is used to indicate the status of a component in duty calculation nom_flag_4 is used to indicate the status of a component in ELC calculation nom_flag_5 is used to indicate the status of a component in ALC calculation i. e. these 3 flags can not be used for any other purposes if ALC is turned on.

inAlc

Yes

String (1)

See description for nom_flag_1. If ALC is turned on (i. e. system_options. import_ind = Y), nom_flag_2 is used to indicate the status of a component in duty calculation nom_flag_4 is used to indicate the status of a component in ELC calculation nom_flag_5 is used to indicate the status of a component in ALC calculation i. e. these 3 flags can not be used for any other purposes if ALC is turned on.

Table 5-1360 Hts - Object. See list of elements for detail

Element Name Required Data Type Description

item

Yes

String (25)

This field contains an unique alphanumeric value that identifies the item.

packItem

No

String (25)

This field contains alphanumeric value that uniquely identifies the pack.

hts

Yes

String (25)

This field contains an identifier for the Harmonized Tariff Schedule code.

status

Yes

String (1)

This field contains a flag to indicate the status of the Purchase Order/Item/HTS relationship. Valid values are (W)orksheet and (A)pproved.

originCountry

Yes

String (3)

This field contains the country of manufacture when the HTS tracking level is M. When the HTS tracking level is S, this stores the country of sourcing.

importCountry

No

String (3)

This field contains the country that the item will be imported in to.

assessments

No

Collection of Object

References the HTS code assessments associated with a particular item of the purchase order.

Table 5-1361 Assessments - Object. See list of elements for detail

Element Name Required Data Type Description

component

Yes

String (10)

This field contains a user specified code representing the specific assessment component found on the ELC_COMP table.

computationValueBase

No

String (10)

This field contains a code representing the base value for calculating the assessment.

componentRate

Yes

Number (20,4)

This field contains the rate to be charged against the calculation base. This field will hold a percentage value if the Calculation Basis of the Component is Value or a monetary amount in the currency defined for the assessment (usually the import country's currency) if the Calculation Basis is Specific.

perCount

No

Number (12,4)

This field contains a count indicating the amount of the Per Count Unit of Measure to which the rate applies. When creating an expense that is defined as $. 20 for every 10 kilograms of an item ordered, the Per Count would be 10.

perCountUom

No

String (4)

This field contains the unit of measure in which the Per Count is specified. When creating an expense that is defined as $. 20 for every 10 kilograms of an item ordered, the Per Count UOM would be the Unit of Measure code for Kilograms.

nominationFlag1

Yes

String (1)

This field contains a flag that is used to indicate if the value of the cost component should be included in the calculation of another. Nomination flags are used to calculate the value of a Computation Value Base (CVB) which has the corresponding nomination flag set to Yes (Y). Valid values are: N/A (N) (the value of this component will not be included in CVBs which look at Nomination Flag 1), Add (+) (the value of this component will be added to CVBs which look at Nomination Flag 1), and Subtract (-) (the value of this component will be deducted from CVBs which look at Nomination Flag 1). For example, if cost component ABC has a + in Nomination Flag 1, then all CVBs that include Nomination Flag 1 will include this cost component value in their calculation basis.

inDuty

Yes

String (1)

See description for nom_flag_1. If ALC is turned on (i. e. system_options. import_ind = Y), nom_flag_2 is used to indicate the status of a component in duty calculation nom_flag_4 is used to indicate the status of a component in ELC calculation nom_flag_5 is used to indicate the status of a component in ALC calculation i. e. these 3 flags can not be used for any other purposes if ALC is turned on.

nominationFlag3

Yes

String (1)

This field contains a flag that is used to indicate if the value of the cost component should be included in the calculation of another. Nomination flags are used to calculate the value of a Computation Value Base (CVB) which has the corresponding nomination flag set to Yes (Y). Valid values are: N/A (N) (the value of this component will not be included in CVBs which look at Nomination Flag 3), Add (+) (the value of this component will be added to CVBs which look at Nomination Flag 3), and Subtract (-) (the value of this component will be deducted from CVBs which look at Nomination Flag 3). For example, if cost component ABC has a + in Nomination Flag 3, then all CVBs that include Nomination Flag 3 will include this cost component value in their calculation basis.

inExpense

Yes

String (1)

See description for nom_flag_1. If ALC is turned on (i. e. system_options. import_ind = Y), nom_flag_2 is used to indicate the status of a component in duty calculation nom_flag_4 is used to indicate the status of a component in ELC calculation nom_flag_5 is used to indicate the status of a component in ALC calculation i. e. these 3 flags can not be used for any other purposes if ALC is turned on.

inAlc

Yes

String (1)

See description for nom_flag_1. If ALC is turned on (i. e. system_options. import_ind = Y), nom_flag_2 is used to indicate the status of a component in duty calculation nom_flag_4 is used to indicate the status of a component in ELC calculation nom_flag_5 is used to indicate the status of a component in ALC calculation i. e. these 3 flags can not be used for any other purposes if ALC is turned on.

Sample Input Message

{
  "items": [
    {
      "orderNo": 464690012,
      "supplier": 2400,
      "currencyCode": "USD",
      "terms": "02",
      "notBeforeDate": "2001-12-31",
      "notAfterDate": "2001-12-31",
      "otbEowDate": "2001-12-31",
      "dept": null,
      "status": "A",
      "exchangeRate": 2,
      "includeOnOrderInd": "Y",
      "writtenDate": "2001-12-31",
      "origin": "2",
      "ediPoInd": "Y",
      "preMarkInd": "Y",
      "approvedBy": null,
      "commentDesc": "Create Order",
      "dataLoadingDestination": "RMS",
      "masterOrderNo": null,
      "ladingPort": "7",
      "dischargePort": "480",
      "factory": "100",
      "agent": "007",
      "shipMethod": "32",
      "partnerType1": "AG",
      "partner1": "007",
      "partnerType2": "E",
      "partner2": "4678",
      "partnerType3": null,
      "partner3": null,
      "importCountry": "US",
      "purchaseType": "FOB",
      "paymentMethod": "LC",
      "titlePassLocationType": "FF",
      "titlePassLocation": "US",
      "purchaseOrderType": "4000",
      "orderType": "N/B",
      "buyer": 1000,
      "location": null,
      "locationType": null,
      "promotion": 41,
      "qualityControlInd": "Y",
      "freightTerms": "03",
      "backhaulType": null,
      "backhaulAllowance": null,
      "shipPayMethod": "PO",
      "transportationResponsibilityType": "FF",
      "transportationResponsibility": "US",
      "vendorOrderNo": "9987001",
      "freightContractNo": "111",
      "pickupLocation": null,
      "pickupNo": null,
      "pickupDate": null,
      "appointmentDateTime": "2001-12-31T23:59:59.123Z",
      "importType": "W",
      "importId": 10001,
      "clearingZoneId": null,
      "routingLocation": null,
      "reApproveInd": null,
      "earliestShipDate": "2001-12-31",
      "latestShipDate": "2001-12-31",
      "fileId": "String",
      "customFlexAttribute": [
        {
          "name": "REVIEW_DATE",
          "value": null,
          "valueDate": "2001-12-31"
        }
      ],
      "details": [
        {
          "item": "103900095",
          "location": 10001,
          "locationType": "W",
          "unitCost": 45.2,
          "referenceItem": null,
          "originCountry": "IN",
          "supplierPackSize": 1,
          "quantityOrdered": 25,
          "cancelInd": null,
          "reinstateInd": null,
          "deliveryDate": "2001-12-31",
          "quantityCancelled": null,
          "cancelCode": null,
          "estimatedInstockDate": "2001-12-31",
          "earliestShipDate": "2001-12-31",
          "latestShipDate": "2001-12-31",
          "customFlexAttribute": [
            {
              "name": "REVIEW_DATE",
              "value": null,
              "valueDate": "2001-12-31"
            }
          ]
        }
      ],
      "itemDetails": [
        {
          "item": "103900095",
          "customFlexAttribute": [
            {
              "name": "REVIEW_DATE",
              "value": null,
              "valueDate": "2001-12-31"
            }
          ]
        }
      ],
      "letterOfCredit": {
        "lcReferenceId": 10015000,
        "lcGroupId": null,
        "applicant": "500",
        "beneficiary": 2400,
        "merchandiseDescription": "Bath Essentials",
        "transshipmentInd": "Y",
        "partialShipmentInd": "Y",
        "lcAttachedInd": "Y"
      },
      "expenses": [
        {
          "item": "103900095",
          "packItem": null,
          "location": 10001,
          "locationType": "W",
          "component": "OCFRT",
          "computationValueBase": null,
          "calculationBasis": null,
          "componentRate": 17,
          "componentCurrency": "INR",
          "exchangeRate": 29,
          "perCount": 1,
          "perCountUom": "M3",
          "nominationFlag1": "N",
          "inDuty": "N",
          "nominationFlag3": "N",
          "inExpense": "+",
          "inAlc": "N"
        }
      ],
      "hts": [
        {
          "item": "103900095",
          "packItem": null,
          "hts": "9014111112",
          "status": "W",
          "originCountry": "IN",
          "importCountry": "US",
          "assessments": [
            {
              "component": "DTYCAUS",
              "computationValueBase": null,
              "componentRate": 12,
              "perCount": 1,
              "perCountUom": "EA",
              "nominationFlag1": "N",
              "inDuty": "+",
              "nominationFlag3": "-",
              "inExpense": "N",
              "inAlc": "N"
            }
          ]
        }
      ]
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS",
  "message": "Service call is successful"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element "validationErrors" will be present when input payload or input parameters are not as per the schema definition of this service. The element "businessError" will be present if the payload passes schema validation but exception is caught while processing business logic.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ],
  "businessError": [
    "Error message"
  ]
}

Delete Purchase Order Details

Functional Area

Purchase Orders

Business Overview

This webservice is used to delete line items from purchase orders in the worksheet status in order to keep Merchandising in sync with an external system that is responsible for maintaining purchase orders. For orders that are not in worksheet status, when a detail delete is requested, it will update the quantities to cancelled quantities and will be subject for re-approval.

For more details on Purchase Orders, see the Create Purchase Order service description.

Service Type

DELETE

ReST URL
MerchIntegrations/services/purchaseOrder/details/delete
Input Payload Details

Table 5-1362 Delete - Object. See list of elements for detail

Element Name Required Data Type Description

items

No

Collection of Object

Table 5-1363 Items - Object. See list of elements for detail

Element Name Required Data Type Description

orderNo

Yes

Number (12)

The unique identifier for the order.

dataLoadingDestination

No

String (6)

This field indicates if the order will be created in RMS or the staging tables. Valid values are RMS or STG. If not defined, the default is STG.

details

No

Collection of Object

This references the order detail node.

Table 5-1364 Details - Object. See list of elements for detail

Element Name Required Data Type Description

item

No

String (25)

An approved, transaction level item. If a pack, it must be an orderable pack (with an order_as_type of 'P').

location

Yes

Number (10)

An active store or warehouse. If multichannel is on, and a warehouse is being order to, a virtual warehouse is expected.

referenceItem

No

String (25)

The id of a reference item which can be used instead of using the item field. If the item field is not populated this field is required.

Sample Input Message

{
  "items": [
    {
      "orderNo": 464690012,
      "dataLoadingDestination": "RMS",
      "details": [
        {
          "item": "100000323",
          "location": 10001,
          "referenceItem": null
        }
      ]
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS",
  "message": "Service call is successful"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element "validationErrors" will be present when input payload or input parameters are not as per the schema definition of this service. The element "businessError" will be present if the payload passes schema validation but exception is caught while processing business logic.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ],
  "businessError": [
    "Error message"
  ]
}

Delete Purchase Order Expenses

Functional Area

Purchase Orders

Business Overview

This webservice is used to delete expense information from the purchase order within Merchandising in order to keep it in sync with an external system that is responsible for maintaining purchase orders. It also updates order header information with the values provided in the request if the order is not yet submitted or approved. Internally, the service sets the status of the order to Worksheet in order to accommodate the modification of expense information for purchase orders in the system that have been submitted or approved. Validation of the updated information is performed before automatic order re-approval is attempted.

For more details on Purchase Orders, see the Create Purchase Order service description.

Service Type

DELETE

ReST URL
MerchIntegrations/services/purchaseOrder/expenses/delete
Input Payload Details

Table 5-1365 Delete - Object. See list of elements for detail

Element Name Required Data Type Description

collectionSize

Yes

Number (4)

Number of items in the collection.

items

Yes

Collection of Object

References a collection of order expenses.

Table 5-1366 Items - Object. See list of elements for detail

Element Name Required Data Type Description

orderNo

Yes

Number (12)

The unique identifier for the order.

dataLoadingDestination

No

String (6)

This field indicates if the order will be created in RMS or the staging tables. Valid values are RMS or STG. If not defined, the default is STG.

expenses

No

Collection of Object

References the expense associated with a particular item/location of the purchase order.

Table 5-1367 Expenses - Object. See list of elements for detail

Element Name Required Data Type Description

item

Yes

String (25)

Unique alphanumeric value that identifies the item.

packItem

No

String (25)

Alphanumeric value that uniquely identifies the pack.

location

Yes

Number (10)

This field contains the location that the item was ordered to.

component

Yes

String (10)

This field contains the component id.

Sample Input Message

{
  "collectionSize": 1,
  "items": [
    {
      "orderNo": 464690012,
      "dataLoadingDestination": "RMS",
      "expenses": [
        {
          "item": "103900095",
          "packItem": null,
          "location": 10001,
          "component": "OCFRT"
        }
      ]
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Delete Purchase Order HTS

Functional Area

Purchase Orders

Business Overview

This webservice is used to delete Harmonized Tariff Schedules and related assessments within Merchandising in order to keep it in sync with an external system that is responsible for maintaining purchase orders. It also updates order header information with the values provided in the request if the order is not yet submitted or approved. When deleting HTS information from a purchase order that has been submitted or approved, internally, the service sets the status of the order to Worksheet in order to accommodate the change in HTS information. Validation of the new HTS information is performed before automatic order re-approval is attempted.

For more details on Purchase Orders, see the Create Purchase Order service description.

Service Type

DELETE

ReST URL
MerchIntegrations/services/purchaseOrder/hts/delete
Input Payload Details

Table 5-1368 Delete - Object. See list of elements for detail

Element Name Required Data Type Description

collectionSize

Yes

Number (4)

Number of items in the collection.

items

Yes

Collection of Object

References a collection of order HTS records.

Table 5-1369 Items - Object. See list of elements for detail

Element Name Required Data Type Description

orderNo

Yes

Number (12)

The unique identifier for the order.

dataLoadingDestination

No

String (6)

This field indicates if the order will be created in RMS or the staging tables. Valid values are RMS or STG. If not defined, the default is STG.

hts

No

Collection of Object

References the HTS code associated with a particular item of the purchase order.

Table 5-1370 Hts - Object. See list of elements for detail

Element Name Required Data Type Description

item

Yes

String (25)

Unique alphanumeric value that identifies the item.

packItem

No

String (25)

Alphanumeric value that uniquely identifies the pack.

hts

Yes

String (25)

The unique identifier for the Harmonized Tariff Schedule code.

Sample Input Message

{
  "collectionSize": 1,
  "items": [
    {
      "orderNo": 464690012,
      "dataLoadingDestination": "RMS",
      "hts": [
        {
          "item": "103900095",
          "packItem": null,
          "hts": "9014111112"
        }
      ]
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Delete Purchase Order HTS Assessments

Functional Area

Purchase Orders

Business Overview

This webservice is used to delete Harmonized Tariff Schedule assessments within Merchandising in order to keep it in sync with an external system that is responsible for maintaining purchase orders. It also updates order header information with the values provided in the request if the order is not yet submitted or approved. When deleting assessment information from a purchase order that has been submitted or approved, the service internally sets the status of the order to Worksheet in order to accommodate the change in information. Validation of the new HTS information is performed before automatic order re-approval is attempted.

For more details on Purchase Orders, see the Create Purchase Order service description.

Service Type

DELETE

ReST URL
MerchIntegrations/services/purchaseOrder/hts/assessments/delete
Input Payload Details

Table 5-1371 Delete - Object. See list of elements for detail

Element Name Required Data Type Description

collectionSize

Yes

Number (4)

Number of items in the collection.

items

Yes

Collection of Object

References a collection of order HTS assessment records.

Table 5-1372 Items - Object. See list of elements for detail

Element Name Required Data Type Description

orderNo

Yes

Number (12)

The unique identifier for the order.

dataLoadingDestination

No

String (6)

This field indicates if the order will be created in RMS or the staging tables. Valid values are RMS or STG. If not defined, the default is STG.

hts

No

Collection of Object

References the HTS code associated with a particular item of the purchase order.

Table 5-1373 Hts - Object. See list of elements for detail

Element Name Required Data Type Description

item

Yes

String (25)

Unique alphanumeric value that identifies the item.

packItem

No

String (25)

Alphanumeric value that uniquely identifies the pack.

hts

Yes

String (25)

The unique identifier for the Harmonized Tariff Schedule code.

assessments

No

Collection of Object

References the assessment associated with the HTS of a particular item in the purchase order.

Table 5-1374 Assessments - Object. See list of elements for detail

Element Name Required Data Type Description

component

Yes

String (10)

This field contains the component id.

Sample Input Message

{
  "collectionSize": 1,
  "items": [
    {
      "orderNo": 464690012,
      "dataLoadingDestination": "RMS",
      "hts": [
        {
          "item": "103900095",
          "packItem": null,
          "hts": "9014111112",
          "assessments": [
            {
              "component": "MPFUS"
            }
          ]
        }
      ]
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Delete Purchase Order Letters of Credit

Functional Area

Purchase Orders

Business Overview

This webservice is used to delete letter of credit information within Merchandising when the order payment type is Letter of Credit in order to keep it in sync with an external system that is responsible for maintaining purchase orders. 

For more details on Purchase Orders, see the Create Purchase Order service description.

Service Type

DELETE

ReST URL
MerchIntegrations/services/purchaseOrder/lettersOfCredit/delete
Input Payload Details

Table 5-1375 Delete - Object. See list of elements for detail

Element Name Required Data Type Description

collectionSize

Yes

Number (4)

Number of items in the collection.

items

Yes

Collection of Object

References a collection of letter of credit records.

Table 5-1376 Items - Object. See list of elements for detail

Element Name Required Data Type Description

orderNo

Yes

Number (12)

The unique identifier for the order.

dataLoadingDestination

No

String (6)

This field indicates if the order will be created in RMS or the staging tables. Valid values are RMS or STG. If not defined, the default is STG.

Sample Input Message

{
  "collectionSize": 1,
  "items": [
    {
      "orderNo": 464690012,
      "dataLoadingDestination": "RMS"
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Delete Purchase Orders

Functional Area

Purchase Orders

Business Overview

This webservice is used to delete purchase orders from Merchandising in sync with an external system that is responsible for maintaining purchase orders. If you are deleting the entire purchase order, this service will first validate that the order number is valid since an existing order number is the only required field for a header delete message. Deleting an order will in effect set the status of the order at the header level to D. Only worksheet orders can be deleted and deletion will not be allowed if the order is submitted, approved or has been approved, or if allocations exist for the order. Delete messages will still be processed, however it will be treated as an update of cancelled quantity and the quantity ordered will be reduced to the quantity available to be cancelled. If this results in all line items being cancelled or if the delete is made at header level, the status of the order will become Closed.

If an order is still in worksheet status, the entire order will be deleted. If the order involves any franchise stores, then any franchise order or return created with the order will also be cancelled or deleted.

For more details on Purchase Orders, see the Create Purchase Order service description.

Service Type

DELETE

ReST URL
MerchIntegrations/services/purchaseOrders/delete
Input Payload Details

Table 5-1377 Delete - Object. See list of elements for detail

Element Name Required Data Type Description

collectionSize

Yes

Number (4)

Number of items in the collection.

items

Yes

Collection of Object

References a collection of orders.

Table 5-1378 Items - Object. See list of elements for detail

Element Name Required Data Type Description

orderNo

Yes

Number (12)

The unique identifier for the order.

dataLoadingDestination

No

String (6)

This field indicates if the order will be created in RMS or the staging tables. Valid values are RMS or STG. If not defined, the default is STG.

Sample Input Message

{
  "collectionSize": 1,
  "items": [
    {
      "orderNo": 464690012,
      "dataLoadingDestination": "RMS"
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Update Purchase Order Details

Functional Area

Purchase Orders

Business Overview

This webservice is used to update detail level attributes of the purchase order such as order quantities, unit cost and line item cancellation information in order to keep Merchandising in sync with an external system that is responsible for maintaining purchase orders. Order details can be updated for orders in Approved, Worksheet, Submitted or Closed status. The only information needed at the header level is the order number, which if not provided, will cause the message to be rejected. All other details provided at the header level will be ignored. Modifying order quantity, as well as supplier pack size or unit cost on an approved or submitted order will in effect set the order status to worksheet and subject it for automatic re-approval. When modifying order quantities, the full amount should be provided, not just the difference in the old and new values. Validations are also done on quantity changes, such as the ordered quantity should not go below the allocated quantity or replenishment quantity, quantity ordered cannot not be less than quantity received.

Fields that can be modified in worksheet, submitted and approved status:

  • Supplier Pack Size

  • Unit Cost – for items with no received quantities

  • Quantity Ordered

Fields that cannot be modified in statuses other than worksheet:

  • Origin Country ID

  • Location

Fields that can be modified only in approved status:

  • Quantity Cancelled

  • Cancel Code

Reinstating order lines

To reinstate orders, the reinstate indicator should be set to Y.  In effect, this will set the cancelled quantities of the line items to 0 and reinstate the ordered quantities.  This will set the status of the reinstated order to Worksheet.

Cancelling a line item in an approved order

In order to cancel a line item on the order, you can set the cancel indicator at the detail level to Y and at the same time, the quantity ordered for that line item must be set to 0. For partial cancellations, either reduce the quantity of an approved order or populate the quantity cancelled field making sure the cancel indicator is blank or set to N. This will allow for the automatic re-approval of the entire order, if there are line items still on the order once processed by the API. The cancel indicator and reinstate indicator cannot both be set to Y at the same time.

For more details on Purchase Orders, see the Create Purchase Order service description.

Reinstating Order Lines

To reinstate orders, the reinstate indicator should be set to Y.  In effect, this will set the cancelled quantities of the line items to 0 and reinstate the ordered quantities.  This will set the status of the reinstated order to Worksheet.

Cancelling a Line Item in an Approved Order

In order to cancel a line item on the order, you can set the cancel indicator at the detail level to Y and at the same time, the quantity ordered for that line item must be set to 0. For partial cancellations, either reduce the quantity of an approved order or populate the quantity cancelled field making sure the cancel indicator is blank or set to N. This will allow for the automatic re-approval of the entire order, if there are line items still on the order once processed by the API. The cancel indicator and reinstate indicator cannot both be set to Y at the same time.

For more details on Purchase Orders, see the Create Purchase Order service description.

Service Type

PUT

ReST URL
MerchIntegrations/services/purchaseOrder/details/update
Input Payload Details

Table 5-1379 Update - Object. See list of elements for detail

Element Name Required Data Type Description

items

Yes

Collection of Object

Table 5-1380 Items - Object. See list of elements for detail

Element Name Required Data Type Description

orderNo

Yes

Number (12)

The unique identifier for the order.

approvedBy

No

String (254)

Indicates where the order was approved. It will be the user ID of the person approving the order.

dataLoadingDestination

No

String (6)

This field indicates if the order will be created in RMS or the staging tables. Valid values are RMS or STG. If not defined, the default is STG.

details

No

Collection of Object

This references the order detail node.

itemDetails

No

Collection of Object

This references the collection of items in the order.

Table 5-1381 Details - Object. See list of elements for detail

Element Name Required Data Type Description

item

No

String (25)

An approved, transaction level item. If a pack, it must be an orderable pack (with an order_as_type of 'P'). This is required if the ref_item field is not populated. An item/location may be added to the order in worksheet or approved status.

location

Yes

Number (10)

An active store or warehouse. If multichannel is on, and a warehouse is being order to, a virtual warehouse is expected. An item/location may be added to the order in worksheet or approved status.

locationType

No

String (1)

The location type of the location. Valid values are 'S' store and 'W' warehouse. This field cannot be modified.

unitCost

No

Number (20,4)

The cost of the item from the supplier in the order's currency. This can be modified if the status is worksheet or approved, but not if any portion of the item's order quantity is in transit or has been received. If it is not specified on the message, it will default from the item supplier cost for this location.

referenceItem

No

String (25)

The id of a reference item which can be used instead of using the item field. If the item field is not populated this field is required. A ref item/location may be added to the order in worksheet or approved status.

originCountry

No

String (3)

The identifier of the country from which the item is being sourced. This field cannot be modified.

supplierPackSize

No

Number (12,4)

The supplier pack size for the item on the order. This may be updated in worksheet or approved status.

quantityOrdered

No

Number (12,4)

The quantity ordered of item. This can be updated in worksheet or approved status to adjust the quantity of an item/location or cancel an item/location from the order.

cancelInd

No

String (1)

Indicates if the detail record's quantity should be cancelled. Valid values are 'Y'es and 'N'o.

reinstateInd

No

String (1)

Indicates if a detail record which was previously cancelled should be reinstated. This will reinstate in the order quantity the amount in the cancelled bucket. Valid values are 'Y'es and 'N'o.

deliveryDate

No

date

The date by which goods are to be delivered. There can be multiple item-locations on the order with different delivery dates.

quantityCancelled

No

Number (12,4)

This field contains the quantity that was left to be ordered when the line item was cancelled.

cancelCode

No

String (1)

This field contains the reason that the line item was cancelled. This field is required if a line item is cancelled.

estimatedInstockDate

No

date

Date that the item on the PO is expected to be available to ship from the PO location to another location. It is calculated as the Order Creation or Approval Date + Supplier Lead Time + Transit Days between the Supplier and the PO/location + Item/Warehouse Inbound Handling Days (if PO location is a warehouse).

earliestShipDate

No

date

The date before which the item can not be shipped by the supplier.

latestShipDate

No

date

The date after which the item can not be shipped by the supplier.

customFlexAttribute

No

Collection of Object

References a collection of custom flexible attributes. This collection is treated as a single group and should include all named flexible attributes for the business entity. If any configured named attribute is missing from the input collection, its value will be set to NULL.

Table 5-1382 CustomFlexAttribute - Object. See list of elements for detail

Element Name Required Data Type Description

name

Yes

String (30)

Holds the attribute name.

value

No

String (250)

Holds the numeric or string value of the attribute.

valueDate

No

date

Holds the date value of the attribute.

Table 5-1383 ItemDetails - Object. See list of elements for detail

Element Name Required Data Type Description

item

No

String (25)

An approved, transaction level item. If a pack, it must be an orderable pack (with an order_as_type of 'P'). This is required if the ref_item field is not populated. An item/location may be added to the order in worksheet or approved status.

customFlexAttribute

No

Collection of Object

References a collection of custom flexible attributes. This collection is treated as a single group and should include all named flexible attributes for the business entity. If any configured named attribute is missing from the input collection, its value will be set to NULL.

Sample Input Message

{
  "items": [
    {
      "orderNo": 464690012,
      "approvedBy": null,
      "dataLoadingDestination": "RMS",
      "details": [
        {
          "item": "103900095",
          "location": 6000,
          "locationType": "W",
          "unitCost": 45.2,
          "referenceItem": null,
          "originCountry": "IN",
          "supplierPackSize": 1,
          "quantityOrdered": 25,
          "cancelInd": null,
          "reinstateInd": null,
          "deliveryDate": "2001-12-31",
          "quantityCancelled": null,
          "cancelCode": null,
          "estimatedInstockDate": "2001-12-31",
          "earliestShipDate": "2001-12-31",
          "latestShipDate": "2001-12-31",
          "customFlexAttribute": [
            {
              "name": "REVIEW_DATE",
              "value": null,
              "valueDate": "2001-12-31"
            }
          ]
        }
      ],
      "itemDetails": [
        {
          "item": "103900095",
          "customFlexAttribute": [
            {
              "name": "REVIEW_DATE",
              "value": null,
              "valueDate": "2001-12-31"
            }
          ]
        }
      ]
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS",
  "message": "Service call is successful"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element "validationErrors" will be present when input payload or input parameters are not as per the schema definition of this service. The element "businessError" will be present if the payload passes schema validation but exception is caught while processing business logic.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ],
  "businessError": [
    "Error message"
  ]
}

Update Purchase Order Expenses

Functional Area

Purchase Orders

Business Overview

This webservice is used to update expense information on the purchase order within Merchandising in order to keep it in sync with an external system that is responsible for maintaining purchase orders. It also updates order header information with the values provided in the request if the order is not yet submitted or approved. Internally, the service sets the status of the order to Worksheet in order to accommodate the modification of expense information for purchase orders in the system that have been submitted or approved. Validation of the new expense information is performed before automatic order re-approval is attempted.

For more details on Purchase Orders, see the Create Purchase Order service description.

Service Type

PUT

ReST URL
MerchIntegrations/services/purchaseOrder/expenses/update
Input Payload Details

Table 5-1384 Update - Object. See list of elements for detail

Element Name Required Data Type Description

collectionSize

Yes

Number (4)

Number of items in the collection.

items

Yes

Collection of Object

References a collection of order expenses.

Table 5-1385 Items - Object. See list of elements for detail

Element Name Required Data Type Description

orderNo

Yes

Number (12)

The unique identifier for the order.

supplier

No

Number (10)

The identifier of the supplier from which the order will be sourced. This cannot be modified if details exist for the PO.

currencyCode

No

String (3)

The code of the order's currency. If not populated, the supplier's currency will be used. This field can be modified if the order status is worksheet or approved and the order has not been shipped.

terms

No

String (15)

The sales terms of the order. If not populated on the create message, will default to the supplier's terms. This can be modified in worksheet or approved status.

notBeforeDate

No

date

The first date that delivery will be accepted. This can be modified in worksheet or approved status.

notAfterDate

No

date

The last date that delivery will be accepted. This can be modified in worksheet or approved status.

otbEowDate

No

date

The end of week date of the OTB bucket used. This can be modified in worksheet or approved status.

dept

No

Number (4)

The department in which are all the items on the order. This field is required if the system enforces single department ordering. This cannot be modified if details exist for the PO.

status

No

String (1)

The code for the status of the order. Valid values are 'W' worksheet and 'A' approved for PO creation. It is also possible to modify the status to 'C' closed.

includeOnOrderInd

No

String (1)

Indicates if the order should be included in on-order calculations. This can be modified in worksheet or approved status. Valid values are Y and N.

writtenDate

No

date

The date the order was created. If this field is not populated on the message it will default to the time of creation in RMS. It cannot be modified.

origin

No

String (2)

Indicates where the order originated. Valid values include: 2 - Manual, 6 - AIP generated order, 7 , 8, 12 - Consignment Vendor Order.

ediPoInd

No

String (1)

Indicates whether or not the order will be transmitted to the supplier via an Electronic Data Exchange transaction. Valid values are: Y = Submit via EDI, N = Do not use EDI.

preMarkInd

No

String (1)

This field indicated whether or not a supplier has agreed to break an order into separate boxes so that the boxes can be sent directly to stores. Valid values are Y and N.

approvedBy

No

String (254)

Indicates where the order was approved. It will be the user ID of the person approving the order.

commentDesc

No

String (2000)

Any comments pertaining to the order.

dataLoadingDestination

No

String (6)

This field indicates if the order will be created in RMS or the staging tables. Valid values are RMS or STG. If not defined, the default is STG.

masterOrderNo

No

Number (12)

This field indicates the master order number from which child records were created.

ladingPort

No

String (5)

This field indicates the port from which the items on the purchase order are shipped.

dischargePort

No

String (5)

This field indicates the port at which the items on the purchase order will enter the country of import.

factory

No

String (10)

This field indicates the factory at which the items on the purchase order are made.

agent

No

String (10)

This field indicates the agent that is used in the purchase of the items on the purchase order.

shipMethod

No

String (6)

This field indicates the method used to ship the items on the purchase order from the country of origin to the country of import.

partnerType1

No

String (6)

This field indicates Partner 1 Type.

partner1

No

String (10)

This field indicates the Additional Partner 1.

partnerType2

No

String (6)

This field indicates Partner 2 Type.

partner2

No

String (10)

This field indicates the Additional Partner 2.

partnerType3

No

String (6)

This field indicates Partner 3 Type.

partner3

No

String (10)

This field indicates the Additional Partner 3.

importCountry

No

String (3)

The identifier of the country into which the items on the order are being imported.

purchaseType

No

String (6)

This field indicates whats included in the suppliers cost of the item. Valid values include C (Cost), CI (Cost and Insurance), CIF (Cost, Insurance and Freight) and FOB (Free on Board).

paymentMethod

No

String (6)

This field indicates the default method for how purchase orders for this site will be paid. Valid values are in the code type PYMT(Payment Method). Examples are Open Account(OA), Letter of Credit(LC) and Wire Transfer(WT).

titlePassLocationType

No

String (2)

Contains the code indicating the type of location or point where ownership of merchandise changes hands from seller/supplier to buyer/retailer. Valid values are found under the FOBT code type. Examples are City and State (AC), Country Of Sourcing (CA) and City (CI).

titlePassLocation

No

String (250)

Contains the description of the location or point where ownership of merchandise changes hands from seller/supplier to buyer/retailer.

purchaseOrderType

No

String (4)

This field contains the value associated with the PO_TYPE for the order.

orderType

No

String (3)

Indicates the type of order and which Open To Buy bucket will be updated. Valid values include: N/B - Non Basic, ARB - Automatic Reorder of Basic, BRB - Buyer Reorder of Basic, DSD - Direct Store Delivery

buyer

No

Number (4)

Contains the number associated with the buyer for the order.

location

No

Number (10)

This field contains the location all items on the order will be delivered to if populated. i. e. It will mean a single location order.

locationType

No

String (1)

This field contains the type of location in the location field. Valid values are: Valid values are S (Store) or W (Warehouse).

promotion

No

Number (10)

Contains the RPCS offer ID associated with the order to provide a link between the order dialog and the promotions dialog.

qualityControlInd

No

String (1)

Determines whether or not quality control will be required when items for this order are received. Valid values are Y and N.

freightTerms

No

String (30)

Indicator that references what freight terms are related to the order.

backhaulType

No

String (6)

This field contains the type of backhaul allowance that will be applied to the order. Some examples are Calculated or Flat rate.

backhaulAllowance

No

Number (20,4)

This field will contain the backhaul allowance value.

shipPayMethod

No

String (2)

Code indicating the payment terms for freight charges associated with the order. Valid values include: CC - Collect, CF - Collect Freight Credited Back to Customer, DF - Defined by Buyer and Seller, MX - Mixed, PC - Prepaid but Charged to Customer, PO - Prepaid Only, PP - Prepaid by Seller.

transportationResponsibilityType

No

String (2)

Contains the code indicating the type of location or point at which the responsibility for transportation transfers from the seller/supplier to the buyer/retailer. Valid values are found under the FOBT code type. Examples are City and State (AC), Country Of Sourcing (CA) and Country (CC).

transportationResponsibility

No

String (250)

Contains the description of the location or point at which the responsibility for transportation transfers from the seller/supplier to the buyer/retailer.

vendorOrderNo

No

String (15)

Contains the vendors unique identifying number for an order. These orders may have originated by the vendor through the EDI process or this number can be associated to a Oracle Retail order when the order is created on-line.

freightContractNo

No

String (10)

The number of the contract with a shipper that will give specific freight rates. This field is only available when the system is running Import functionality.

pickupLocation

No

String (250)

Contains the location at which the order will be picked up, if the order is a Pickup order.

pickupNo

No

String (25)

Contains the reference number of the Pickup order.

pickupDate

No

date

Contains the date when the order can be picked up from the Supplier. This field is only required if the Purchase Type of the order is Pickup.

appointmentDateTime

No

date-time

This column will hold the date and time of the receiving appointment at the warehouse.

importType

No

String (1)

Valid values are IMporter and EXporter. This is the default importer/exporter assigned to the supplier of the Puchase order.

importId

No

Number (10)

This identifies the importer/exporter assigned to the supplier. This should reference the WH. WH folumn with foreign key created.

clearingZoneId

No

String (5)

This column will hold the clearing zone id.

routingLocation

No

String (5)

This is the default routing location for the import order. FK on OUTLOC. OUTLOC_ID.

reApproveInd

No

String (1)

This field indicates that the update to the corresponding purchase order needs to be performed, and then it should be approved again. Valid values are Y and N.

earliestShipDate

No

date

The date before which the item can not be shipped by the supplier.

latestShipDate

No

date

The date after which the item can not be shipped by the supplier.

customFlexAttribute

No

Collection of Object

References a collection of custom flexible attributes. This collection is treated as a single group and should include all named flexible attributes for the business entity. If any configured named attribute is missing from the input collection, its value will be set to NULL.

expenses

No

Collection of Object

References the expense associated with a particular item/location of the purchase order.

Table 5-1386 CustomFlexAttribute - Object. See list of elements for detail

Element Name Required Data Type Description

name

Yes

String (30)

Holds the attribute name.

value

No

String (250)

Holds the numeric or string value of the attribute.

valueDate

No

date

Holds the date value of the attribute.

Table 5-1387 Expenses - Object. See list of elements for detail

Element Name Required Data Type Description

item

Yes

String (25)

This field contains alphanumeric value that uniquely identifies the item.

packItem

No

String (25)

This field contains alphanumeric value that uniquely identifies the pack.

location

Yes

Number (10)

This field contains the location that item will be ordered to. This field may contain a store or a warehouse.

locationType

Yes

String (1)

This field contains the type of location in the location field. Valid values are: S - Store W - Warehouse.

component

Yes

String (10)

This field contains a user specified code representing a specific expense found on the ELC_COMP table.

computationValueBase

No

String (10)

This field contains a code representing the base value for calculating the expense.

calculationBasis

No

String (1)

This field contains the basis the expense will be calculated against if there is no CVB code attached to the expense. Valid values are S (Supplier) or O (Order). If the Cost Basis is S then when calculating the expense, the items supplier cost will be used. If the Cost Basis is O then the order unit cost of the item on the order will be used to calculate the expense. The code type for this field is EXCB.

componentRate

Yes

Number (20,4)

This field contains the rate to be charged against the calculation base of the component (either value or specific).

componentCurrency

Yes

String (3)

This field contains the currency the expense or assessment is to be entered in. If the Calculation Basis is V (Value), then comp_currency will be NULL.

exchangeRate

Yes

Number (20,10)

This field contains the exchange rate of the individual expense.

perCount

No

Number (12,4)

This field contains a count indicating the amount of the Per Count Unit of Measure to which the rate applies. When creating an expense that is defined as $. 20 for every 10 kilograms of an item ordered, the Per Count would be 10.

perCountUom

No

String (4)

This field contains the unit of measure in which the Per Count is specified. When creating an expense that is defined as $. 20 for every 10 kilograms of an item ordered, the Per Count UOM would be the Unit of Measure code for Kilograms.

nominationFlag1

Yes

String (1)

This field contains a flag that is used to indicate if the value of the cost component should be included in the calculation of another. Nomination flags are used to calculate the value of a Computation Value Base (CVB) which has the corresponding nomination flag set to Yes (Y). Valid values are: N/A (N) (the value of this component will not be included in CVBs which look at Nomination Flag 1), Add (+) (the value of this component will be added to CVBs which look at Nomination Flag 1), and Subtract (-) (the value of this component will be deducted from CVBs which look at Nomination Flag 1). For example, if cost component ABC has a + in Nomination Flag 1, then all CVBs that include Nomination Flag 1 will include this cost component value in their calculation basis.

inDuty

Yes

String (1)

If Import Management is enabled in Merchandising (i. e. system_options. import_ind = Y), the inDuty flag is used to indicate if the value of the cost component should be included in total duty.

nominationFlag3

Yes

String (1)

This field contains a flag that is used to indicate if the value of the cost component should be included in the calculation of another. Nomination flags are used to calculate the value of a Computation Value Base (CVB) which has the corresponding nomination flag set to Yes (Y). Valid values are: N/A (N) (the value of this component will not be included in CVBs which look at Nomination Flag 3), Add (+) (the value of this component will be added to CVBs which look at Nomination Flag 3), and Subtract (-) (the value of this component will be deducted from CVBs which look at Nomination Flag 3). For example, if cost component ABC has a + in Nomination Flag 3, then all CVBs that include Nomination Flag 3 will include this cost component value in their calculation basis.

inExpense

Yes

String (1)

The inExpense flag is used to indicate if the value of the cost component should be included in total expenses.

inAlc

Yes

String (1)

The inALC flag is used for cost components where the retailer does not expect to receive an actual value for the charge via an obligation or customs entry. The inALC flag allows the value of the cost component to be included in ALC via direct nomination and indicates to the system that the estimated value on the order should be used as the actual value as well because no other actual will be provided.

Sample Input Message

{
  "collectionSize": 1,
  "items": [
    {
      "orderNo": 464690012,
      "supplier": 2400,
      "currencyCode": "USD",
      "terms": "02",
      "notBeforeDate": "2001-12-31",
      "notAfterDate": "2001-12-31",
      "otbEowDate": "2001-12-31",
      "dept": null,
      "status": "A",
      "includeOnOrderInd": "Y",
      "writtenDate": "2001-12-31",
      "origin": "2",
      "ediPoInd": "Y",
      "preMarkInd": "Y",
      "approvedBy": null,
      "commentDesc": "Create Order",
      "dataLoadingDestination": "RMS",
      "masterOrderNo": null,
      "ladingPort": "7",
      "dischargePort": "480",
      "factory": "100",
      "agent": "007",
      "shipMethod": "32",
      "partnerType1": "AG",
      "partner1": "007",
      "partnerType2": "E",
      "partner2": "4678",
      "partnerType3": null,
      "partner3": null,
      "importCountry": "US",
      "purchaseType": "FOB",
      "paymentMethod": "LC",
      "titlePassLocationType": "FF",
      "titlePassLocation": "US",
      "purchaseOrderType": "4000",
      "orderType": "N/B",
      "buyer": 1000,
      "location": null,
      "locationType": null,
      "promotion": 41,
      "qualityControlInd": "Y",
      "freightTerms": "03",
      "backhaulType": null,
      "backhaulAllowance": null,
      "shipPayMethod": "PO",
      "transportationResponsibilityType": "FF",
      "transportationResponsibility": "US",
      "vendorOrderNo": "9987001",
      "freightContractNo": "111",
      "pickupLocation": null,
      "pickupNo": null,
      "pickupDate": null,
      "appointmentDateTime": "2001-12-31T23:59:59.123Z",
      "importType": "W",
      "importId": 10001,
      "clearingZoneId": null,
      "routingLocation": null,
      "reApproveInd": null,
      "earliestShipDate": "2001-12-31",
      "latestShipDate": "2001-12-31",
      "customFlexAttribute": [
        {
          "name": "REVIEW_DATE",
          "value": null,
          "valueDate": "2001-12-31"
        }
      ],
      "expenses": [
        {
          "item": "103900095",
          "packItem": null,
          "location": 10001,
          "locationType": "W",
          "component": "OCFRT",
          "computationValueBase": null,
          "calculationBasis": null,
          "componentRate": 17,
          "componentCurrency": "INR",
          "exchangeRate": 29,
          "perCount": 1,
          "perCountUom": "M3",
          "nominationFlag1": "N",
          "inDuty": "N",
          "nominationFlag3": "N",
          "inExpense": "+",
          "inAlc": "N"
        }
      ]
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Update Purchase Order HTS

Functional Area

Purchase Orders

Business Overview

This webservice is used to update Harmonized Tariff Schedules and related assessments within Merchandising in order to keep it in sync with an external system that is responsible for maintaining purchase orders. It also updates order header information with the values provided in the request if the order is not yet submitted or approved. When updating HTS information for a purchase order that has been submitted or approved, internally, the service sets the status of the order to Worksheet in order to accommodate the change in HTS information. Validation of the new HTS information is performed before automatic order re-approval is attempted.

For more details on Purchase Orders, see the Create Purchase Order service description.

Service Type

PUT

ReST URL
MerchIntegrations/services/purchaseOrder/hts/update
Input Payload Details

Table 5-1388 Update - Object. See list of elements for detail

Element Name Required Data Type Description

collectionSize

Yes

Number (4)

Number of items in the collection.

items

Yes

Collection of Object

References a collection of order HTS records.

Table 5-1389 Items - Object. See list of elements for detail

Element Name Required Data Type Description

orderNo

Yes

Number (12)

The unique identifier for the order.

supplier

No

Number (10)

The identifier of the supplier from which the order will be sourced. This cannot be modified if details exist for the PO.

currencyCode

No

String (3)

The code of the order's currency. If not populated, the supplier's currency will be used. This field can be modified if the order status is worksheet or approved and the order has not been shipped.

terms

No

String (15)

The sales terms of the order. If not populated on the create message, will default to the supplier's terms. This can be modified in worksheet or approved status.

notBeforeDate

No

date

The first date that delivery will be accepted. This can be modified in worksheet or approved status.

notAfterDate

No

date

The last date that delivery will be accepted. This can be modified in worksheet or approved status.

otbEowDate

No

date

The end of week date of the OTB bucket used. This can be modified in worksheet or approved status.

dept

No

Number (4)

The department in which are all the items on the order. This field is required if the system enforces single department ordering. This cannot be modified if details exist for the PO.

status

No

String (1)

The code for the status of the order. Valid values are 'W' worksheet and 'A' approved for PO creation. It is also possible to modify the status to 'C' closed.

includeOnOrderInd

No

String (1)

Indicates if the order should be included in on-order calculations. This can be modified in worksheet or approved status. Valid values are Y and N.

writtenDate

No

date

The date the order was created. If this field is not populated on the message it will default to the time of creation in RMS. It cannot be modified.

origin

No

String (2)

Indicates where the order originated. Valid values include: 2 - Manual, 6 - AIP generated order, 7 , 8, 12 - Consignment Vendor Order.

ediPoInd

No

String (1)

Indicates whether or not the order will be transmitted to the supplier via an Electronic Data Exchange transaction. Valid values are: Y = Submit via EDI, N = Do not use EDI.

preMarkInd

No

String (1)

This field indicated whether or not a supplier has agreed to break an order into separate boxes so that the boxes can be sent directly to stores. Valid values are Y and N.

approvedBy

No

String (254)

Indicates where the order was approved. It will be the user ID of the person approving the order.

commentDesc

No

String (2000)

Any comments pertaining to the order.

dataLoadingDestination

No

String (6)

This field indicates if the order will be created in RMS or the staging tables. Valid values are RMS or STG. If not defined, the default is STG.

masterOrderNo

No

Number (12)

This field indicates the master order number from which child records were created.

ladingPort

No

String (5)

This field indicates the port from which the items on the purchase order are shipped.

dischargePort

No

String (5)

This field indicates the port at which the items on the purchase order will enter the country of import.

factory

No

String (10)

This field indicates the factory at which the items on the purchase order are made.

agent

No

String (10)

This field indicates the agent that is used in the purchase of the items on the purchase order.

shipMethod

No

String (6)

This field indicates the method used to ship the items on the purchase order from the country of origin to the country of import.

partnerType1

No

String (6)

This field indicates Partner 1 Type.

partner1

No

String (10)

This field indicates the Additional Partner 1.

partnerType2

No

String (6)

This field indicates Partner 2 Type.

partner2

No

String (10)

This field indicates the Additional Partner 2.

partnerType3

No

String (6)

This field indicates Partner 3 Type.

partner3

No

String (10)

This field indicates the Additional Partner 3.

importCountry

No

String (3)

The identifier of the country into which the items on the order are being imported.

purchaseType

No

String (6)

This field indicates whats included in the suppliers cost of the item. Valid values include C (Cost), CI (Cost and Insurance), CIF (Cost, Insurance and Freight) and FOB (Free on Board).

paymentMethod

No

String (6)

This field indicates the default method for how purchase orders for this site will be paid. Valid values are in the code type PYMT(Payment Method). Examples are Open Account(OA), Letter of Credit(LC) and Wire Transfer(WT).

titlePassLocationType

No

String (2)

Contains the code indicating the type of location or point where ownership of merchandise changes hands from seller/supplier to buyer/retailer. Valid values are found under the FOBT code type. Examples are City and State (AC), Country Of Sourcing (CA) and City (CI).

titlePassLocation

No

String (250)

Contains the description of the location or point where ownership of merchandise changes hands from seller/supplier to buyer/retailer.

purchaseOrderType

No

String (4)

This field contains the value associated with the PO_TYPE for the order.

orderType

No

String (3)

Indicates the type of order and which Open To Buy bucket will be updated. Valid values include: N/B - Non Basic, ARB - Automatic Reorder of Basic, BRB - Buyer Reorder of Basic, DSD - Direct Store Delivery

buyer

No

Number (4)

Contains the number associated with the buyer for the order.

location

No

Number (10)

This field contains the location all items on the order will be delivered to if populated. i. e. It will mean a single location order.

locationType

No

String (1)

This field contains the type of location in the location field. Valid values are: Valid values are S (Store) or W (Warehouse).

promotion

No

Number (10)

Contains the RPCS offer ID associated with the order to provide a link between the order dialog and the promotions dialog.

qualityControlInd

No

String (1)

Determines whether or not quality control will be required when items for this order are received. Valid values are Y and N.

freightTerms

No

String (30)

Indicator that references what freight terms are related to the order.

backhaulType

No

String (6)

This field contains the type of backhaul allowance that will be applied to the order. Some examples are Calculated or Flat rate.

backhaulAllowance

No

Number (20,4)

This field will contain the backhaul allowance value.

shipPayMethod

No

String (2)

Code indicating the payment terms for freight charges associated with the order. Valid values include: CC - Collect, CF - Collect Freight Credited Back to Customer, DF - Defined by Buyer and Seller, MX - Mixed, PC - Prepaid but Charged to Customer, PO - Prepaid Only, PP - Prepaid by Seller.

transportationResponsibilityType

No

String (2)

Contains the code indicating the type of location or point at which the responsibility for transportation transfers from the seller/supplier to the buyer/retailer. Valid values are found under the FOBT code type. Examples are City and State (AC), Country Of Sourcing (CA) and Country (CC).

transportationResponsibility

No

String (250)

Contains the description of the location or point at which the responsibility for transportation transfers from the seller/supplier to the buyer/retailer.

vendorOrderNo

No

String (15)

Contains the vendors unique identifying number for an order. These orders may have originated by the vendor through the EDI process or this number can be associated to a Oracle Retail order when the order is created on-line.

freightContractNo

No

String (10)

The number of the contract with a shipper that will give specific freight rates. This field is only available when the system is running Import functionality.

pickupLocation

No

String (250)

Contains the location at which the order will be picked up, if the order is a Pickup order.

pickupNo

No

String (25)

Contains the reference number of the Pickup order.

pickupDate

No

date

Contains the date when the order can be picked up from the Supplier. This field is only required if the Purchase Type of the order is Pickup.

appointmentDateTime

No

date-time

This column will hold the date and time of the receiving appointment at the warehouse.

importType

No

String (1)

Valid values are IMporter and EXporter. This is the default importer/exporter assigned to the supplier of the Puchase order.

importId

No

Number (10)

This identifies the importer/exporter assigned to the supplier. This should reference the WH. WH folumn with foreign key created.

clearingZoneId

No

String (5)

This column will hold the clearing zone id.

routingLocation

No

String (5)

This is the default routing location for the import order. FK on OUTLOC. OUTLOC_ID.

reApproveInd

No

String (1)

This field indicates that the update to the corresponding purchase order needs to be performed, and then it should be approved again. Valid values are Y and N.

earliestShipDate

No

date

The date before which the item can not be shipped by the supplier.

latestShipDate

No

date

The date after which the item can not be shipped by the supplier.

customFlexAttribute

No

Collection of Object

References a collection of custom flexible attributes. This collection is treated as a single group and should include all named flexible attributes for the business entity. If any configured named attribute is missing from the input collection, its value will be set to NULL.

hts

No

Collection of Object

References the HTS code associated with a particular item of the purchase order.

Table 5-1390 CustomFlexAttribute - Object. See list of elements for detail

Element Name Required Data Type Description

name

Yes

String (30)

Holds the attribute name.

value

No

String (250)

Holds the numeric or string value of the attribute.

valueDate

No

date

Holds the date value of the attribute.

Table 5-1391 Hts - Object. See list of elements for detail

Element Name Required Data Type Description

item

Yes

String (25)

This field contains an unique alphanumeric value that identifies the item.

packItem

No

String (25)

This field contains alphanumeric value that uniquely identifies the pack.

hts

Yes

String (25)

This field contains an identifier for the Harmonized Tariff Schedule code.

status

Yes

String (1)

This field contains a flag to indicate the status of the Purchase Order/Item/HTS relationship. Valid values are (W)orksheet and (A)pproved.

originCountry

Yes

String (3)

This field contains the country of manufacture when the HTS tracking level is M. When the HTS tracking level is S, this stores the country of sourcing.

importCountry

No

String (3)

This field contains the country that the item will be imported in to.

assessments

No

Collection of Object

References the HTS code assessments associated with a particular item of the purchase order.

Table 5-1392 Assessments - Object. See list of elements for detail

Element Name Required Data Type Description

component

Yes

String (10)

This field contains a user specified code representing the specific assessment component found on the ELC_COMP table.

computationValueBase

No

String (10)

This field contains a code representing the base value for calculating the assessment.

componentRate

Yes

Number (20,4)

This field contains the rate to be charged against the calculation base. This field will hold a percentage value if the Calculation Basis of the Component is Value or a monetary amount in the currency defined for the assessment (usually the import country's currency) if the Calculation Basis is Specific.

perCount

No

Number (12,4)

This field contains a count indicating the amount of the Per Count Unit of Measure to which the rate applies. When creating an expense that is defined as $. 20 for every 10 kilograms of an item ordered, the Per Count would be 10.

perCountUom

No

String (4)

This field contains the unit of measure in which the Per Count is specified. When creating an expense that is defined as $. 20 for every 10 kilograms of an item ordered, the Per Count UOM would be the Unit of Measure code for Kilograms.

nominationFlag1

Yes

String (1)

This field contains a flag that is used to indicate if the value of the cost component should be included in the calculation of another. Nomination flags are used to calculate the value of a Computation Value Base (CVB) which has the corresponding nomination flag set to Yes (Y). Valid values are: N/A (N) (the value of this component will not be included in CVBs which look at Nomination Flag 1), Add (+) (the value of this component will be added to CVBs which look at Nomination Flag 1), and Subtract (-) (the value of this component will be deducted from CVBs which look at Nomination Flag 1). For example, if cost component ABC has a + in Nomination Flag 1, then all CVBs that include Nomination Flag 1 will include this cost component value in their calculation basis.

inDuty

Yes

String (1)

If Import Management is enabled in Merchandising (i. e. system_options. import_ind = Y), the inDuty flag is used to indicate if the value of the cost component should be included in total duty.

nominationFlag3

Yes

String (1)

This field contains a flag that is used to indicate if the value of the cost component should be included in the calculation of another. Nomination flags are used to calculate the value of a Computation Value Base (CVB) which has the corresponding nomination flag set to Yes (Y). Valid values are: N/A (N) (the value of this component will not be included in CVBs which look at Nomination Flag 3), Add (+) (the value of this component will be added to CVBs which look at Nomination Flag 3), and Subtract (-) (the value of this component will be deducted from CVBs which look at Nomination Flag 3). For example, if cost component ABC has a + in Nomination Flag 3, then all CVBs that include Nomination Flag 3 will include this cost component value in their calculation basis.

inExpense

Yes

String (1)

The inExpense flag is used to indicate if the value of the cost component should be included in total expenses.

inAlc

Yes

String (1)

The inALC flag is used for cost components where the retailer does not expect to receive an actual value for the charge via an obligation or customs entry. The inALC flag allows the value of the cost component to be included in ALC via direct nomination and indicates to the system that the estimated value on the order should be used as the actual value as well because no other actual will be provided.

Sample Input Message

{
  "collectionSize": 1,
  "items": [
    {
      "orderNo": 464690012,
      "supplier": 2400,
      "currencyCode": "USD",
      "terms": "02",
      "notBeforeDate": "2001-12-31",
      "notAfterDate": "2001-12-31",
      "otbEowDate": "2001-12-31",
      "dept": null,
      "status": "A",
      "includeOnOrderInd": "Y",
      "writtenDate": "2001-12-31",
      "origin": "2",
      "ediPoInd": "Y",
      "preMarkInd": "Y",
      "approvedBy": null,
      "commentDesc": "Create Order",
      "dataLoadingDestination": "RMS",
      "masterOrderNo": null,
      "ladingPort": "7",
      "dischargePort": "480",
      "factory": "100",
      "agent": "007",
      "shipMethod": "32",
      "partnerType1": "AG",
      "partner1": "007",
      "partnerType2": "E",
      "partner2": "4678",
      "partnerType3": null,
      "partner3": null,
      "importCountry": "US",
      "purchaseType": "FOB",
      "paymentMethod": "LC",
      "titlePassLocationType": "FF",
      "titlePassLocation": "US",
      "purchaseOrderType": "4000",
      "orderType": "N/B",
      "buyer": 1000,
      "location": null,
      "locationType": null,
      "promotion": 41,
      "qualityControlInd": "Y",
      "freightTerms": "03",
      "backhaulType": null,
      "backhaulAllowance": null,
      "shipPayMethod": "PO",
      "transportationResponsibilityType": "FF",
      "transportationResponsibility": "US",
      "vendorOrderNo": "9987001",
      "freightContractNo": "111",
      "pickupLocation": null,
      "pickupNo": null,
      "pickupDate": null,
      "appointmentDateTime": "2001-12-31T23:59:59.123Z",
      "importType": "W",
      "importId": 10001,
      "clearingZoneId": null,
      "routingLocation": null,
      "reApproveInd": null,
      "earliestShipDate": "2001-12-31",
      "latestShipDate": "2001-12-31",
      "customFlexAttribute": [
        {
          "name": "REVIEW_DATE",
          "value": null,
          "valueDate": "2001-12-31"
        }
      ],
      "hts": [
        {
          "item": "103900095",
          "packItem": null,
          "hts": "9014111112",
          "status": "W",
          "originCountry": "IN",
          "importCountry": "US",
          "assessments": [
            {
              "component": "DTYCAUS",
              "computationValueBase": null,
              "componentRate": 12,
              "perCount": 1,
              "perCountUom": "EA",
              "nominationFlag1": "N",
              "inDuty": "+",
              "nominationFlag3": "-",
              "inExpense": "N",
              "inAlc": "N"
            }
          ]
        }
      ]
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Update Purchase Order HTS Assessments

Functional Area

Purchase Orders

Business Overview

This webservice is used to update Harmonized Tariff Schedules assessments within Merchandising in order to keep it in sync with an external system that is responsible for maintaining purchase orders. It also updates order header information with the values provided in the request if the order is not yet submitted or approved. When updating assessment information for a purchase order that has been submitted or approved, the service internally sets the status of the order to Worksheet in order to accommodate the change in assessment information. Validation of the new information is performed before automatic order re-approval is attempted.

For more details on Purchase Orders, see the Create Purchase Order service description.

Service Type

PUT

ReST URL
MerchIntegrations/services/purchaseOrder/hts/assessments/update
Input Payload Details

Table 5-1393 Update - Object. See list of elements for detail

Element Name Required Data Type Description

collectionSize

Yes

Number (4)

Number of items in the collection.

items

Yes

Collection of Object

References a collection of order HTS assessment records.

Table 5-1394 Items - Object. See list of elements for detail

Element Name Required Data Type Description

orderNo

Yes

Number (12)

The unique identifier for the order.

supplier

No

Number (10)

The identifier of the supplier from which the order will be sourced. This cannot be modified if details exist for the PO.

currencyCode

No

String (3)

The code of the order's currency. If not populated, the supplier's currency will be used. This field can be modified if the order status is worksheet or approved and the order has not been shipped.

terms

No

String (15)

The sales terms of the order. If not populated on the create message, will default to the supplier's terms. This can be modified in worksheet or approved status.

notBeforeDate

No

date

The first date that delivery will be accepted. This can be modified in worksheet or approved status.

notAfterDate

No

date

The last date that delivery will be accepted. This can be modified in worksheet or approved status.

otbEowDate

No

date

The end of week date of the OTB bucket used. This can be modified in worksheet or approved status.

dept

No

Number (4)

The department in which are all the items on the order. This field is required if the system enforces single department ordering. This cannot be modified if details exist for the PO.

status

No

String (1)

The code for the status of the order. Valid values are 'W' worksheet and 'A' approved for PO creation. It is also possible to modify the status to 'C' closed.

includeOnOrderInd

No

String (1)

Indicates if the order should be included in on-order calculations. This can be modified in worksheet or approved status. Valid values are Y and N.

writtenDate

No

date

The date the order was created. If this field is not populated on the message it will default to the time of creation in RMS. It cannot be modified.

origin

No

String (2)

Indicates where the order originated. Valid values include: 2 - Manual, 6 - AIP generated order, 7 , 8, 12 - Consignment Vendor Order.

ediPoInd

No

String (1)

Indicates whether or not the order will be transmitted to the supplier via an Electronic Data Exchange transaction. Valid values are: Y = Submit via EDI, N = Do not use EDI.

preMarkInd

No

String (1)

This field indicated whether or not a supplier has agreed to break an order into separate boxes so that the boxes can be sent directly to stores. Valid values are Y and N.

approvedBy

No

String (254)

Indicates where the order was approved. It will be the user ID of the person approving the order.

commentDesc

No

String (2000)

Any comments pertaining to the order.

dataLoadingDestination

No

String (6)

This field indicates if the order will be created in RMS or the staging tables. Valid values are RMS or STG. If not defined, the default is STG.

masterOrderNo

No

Number (12)

This field indicates the master order number from which child records were created.

ladingPort

No

String (5)

This field indicates the port from which the items on the purchase order are shipped.

dischargePort

No

String (5)

This field indicates the port at which the items on the purchase order will enter the country of import.

factory

No

String (10)

This field indicates the factory at which the items on the purchase order are made.

agent

No

String (10)

This field indicates the agent that is used in the purchase of the items on the purchase order.

shipMethod

No

String (6)

This field indicates the method used to ship the items on the purchase order from the country of origin to the country of import.

partnerType1

No

String (6)

This field indicates Partner 1 Type.

partner1

No

String (10)

This field indicates the Additional Partner 1.

partnerType2

No

String (6)

This field indicates Partner 2 Type.

partner2

No

String (10)

This field indicates the Additional Partner 2.

partnerType3

No

String (6)

This field indicates Partner 3 Type.

partner3

No

String (10)

This field indicates the Additional Partner 3.

importCountry

No

String (3)

The identifier of the country into which the items on the order are being imported.

purchaseType

No

String (6)

This field indicates whats included in the suppliers cost of the item. Valid values include C (Cost), CI (Cost and Insurance), CIF (Cost, Insurance and Freight) and FOB (Free on Board).

paymentMethod

No

String (6)

This field indicates the default method for how purchase orders for this site will be paid. Valid values are in the code type PYMT(Payment Method). Examples are Open Account(OA), Letter of Credit(LC) and Wire Transfer(WT).

titlePassLocationType

No

String (2)

Contains the code indicating the type of location or point where ownership of merchandise changes hands from seller/supplier to buyer/retailer. Valid values are found under the FOBT code type. Examples are City and State (AC), Country Of Sourcing (CA) and City (CI).

titlePassLocation

No

String (250)

Contains the description of the location or point where ownership of merchandise changes hands from seller/supplier to buyer/retailer.

purchaseOrderType

No

String (4)

This field contains the value associated with the PO_TYPE for the order.

orderType

No

String (3)

Indicates the type of order and which Open To Buy bucket will be updated. Valid values include: N/B - Non Basic, ARB - Automatic Reorder of Basic, BRB - Buyer Reorder of Basic, DSD - Direct Store Delivery

buyer

No

Number (4)

Contains the number associated with the buyer for the order.

location

No

Number (10)

This field contains the location all items on the order will be delivered to if populated. i. e. It will mean a single location order.

locationType

No

String (1)

This field contains the type of location in the location field. Valid values are: Valid values are S (Store) or W (Warehouse).

promotion

No

Number (10)

Contains the RPCS offer ID associated with the order to provide a link between the order dialog and the promotions dialog.

qualityControlInd

No

String (1)

Determines whether or not quality control will be required when items for this order are received. Valid values are Y and N.

freightTerms

No

String (30)

Indicator that references what freight terms are related to the order.

backhaulType

No

String (6)

This field contains the type of backhaul allowance that will be applied to the order. Some examples are Calculated or Flat rate.

backhaulAllowance

No

Number (20,4)

This field will contain the backhaul allowance value.

shipPayMethod

No

String (2)

Code indicating the payment terms for freight charges associated with the order. Valid values include: CC - Collect, CF - Collect Freight Credited Back to Customer, DF - Defined by Buyer and Seller, MX - Mixed, PC - Prepaid but Charged to Customer, PO - Prepaid Only, PP - Prepaid by Seller.

transportationResponsibilityType

No

String (2)

Contains the code indicating the type of location or point at which the responsibility for transportation transfers from the seller/supplier to the buyer/retailer. Valid values are found under the FOBT code type. Examples are City and State (AC), Country Of Sourcing (CA) and Country (CC).

transportationResponsibility

No

String (250)

Contains the description of the location or point at which the responsibility for transportation transfers from the seller/supplier to the buyer/retailer.

vendorOrderNo

No

String (15)

Contains the vendors unique identifying number for an order. These orders may have originated by the vendor through the EDI process or this number can be associated to a Oracle Retail order when the order is created on-line.

freightContractNo

No

String (10)

The number of the contract with a shipper that will give specific freight rates. This field is only available when the system is running Import functionality.

pickupLocation

No

String (250)

Contains the location at which the order will be picked up, if the order is a Pickup order.

pickupNo

No

String (25)

Contains the reference number of the Pickup order.

pickupDate

No

date

Contains the date when the order can be picked up from the Supplier. This field is only required if the Purchase Type of the order is Pickup.

appointmentDateTime

No

date-time

This column will hold the date and time of the receiving appointment at the warehouse.

importType

No

String (1)

Valid values are IMporter and EXporter. This is the default importer/exporter assigned to the supplier of the Puchase order.

importId

No

Number (10)

This identifies the importer/exporter assigned to the supplier. This should reference the WH. WH folumn with foreign key created.

clearingZoneId

No

String (5)

This column will hold the clearing zone id.

routingLocation

No

String (5)

This is the default routing location for the import order. FK on OUTLOC. OUTLOC_ID.

reApproveInd

No

String (1)

This field indicates that the update to the corresponding purchase order needs to be performed, and then it should be approved again. Valid values are Y and N.

earliestShipDate

No

date

The date before which the item can not be shipped by the supplier.

latestShipDate

No

date

The date after which the item can not be shipped by the supplier.

customFlexAttribute

No

Collection of Object

References a collection of custom flexible attributes. This collection is treated as a single group and should include all named flexible attributes for the business entity. If any configured named attribute is missing from the input collection, its value will be set to NULL.

hts

No

Collection of Object

References the HTS code associated with a particular item of the purchase order.

Table 5-1395 CustomFlexAttribute - Object. See list of elements for detail

Element Name Required Data Type Description

name

Yes

String (30)

Holds the attribute name.

value

No

String (250)

Holds the numeric or string value of the attribute.

valueDate

No

date

Holds the date value of the attribute.

Table 5-1396 Hts - Object. See list of elements for detail

Element Name Required Data Type Description

item

Yes

String (25)

This field contains an unique alphanumeric value that identifies the item.

packItem

No

String (25)

This field contains alphanumeric value that uniquely identifies the pack.

hts

Yes

String (25)

This field contains an identifier for the Harmonized Tariff Schedule code.

status

Yes

String (1)

This field contains a flag to indicate the status of the Purchase Order/Item/HTS relationship. Valid values are (W)orksheet and (A)pproved.

originCountry

Yes

String (3)

This field contains the country of manufacture when the HTS tracking level is M. When the HTS tracking level is S, this stores the country of sourcing.

importCountry

No

String (3)

This field contains the country that the item will be imported in to.

assessments

No

Collection of Object

References the HTS code assessments associated with a particular item of the purchase order.

Table 5-1397 Assessments - Object. See list of elements for detail

Element Name Required Data Type Description

component

Yes

String (10)

This field contains a user specified code representing the specific assessment component found on the ELC_COMP table.

computationValueBase

No

String (10)

This field contains a code representing the base value for calculating the assessment.

componentRate

Yes

Number (20,4)

This field contains the rate to be charged against the calculation base. This field will hold a percentage value if the Calculation Basis of the Component is Value or a monetary amount in the currency defined for the assessment (usually the import country's currency) if the Calculation Basis is Specific.

perCount

No

Number (12,4)

This field contains a count indicating the amount of the Per Count Unit of Measure to which the rate applies. When creating an expense that is defined as $. 20 for every 10 kilograms of an item ordered, the Per Count would be 10.

perCountUom

No

String (4)

This field contains the unit of measure in which the Per Count is specified. When creating an expense that is defined as $. 20 for every 10 kilograms of an item ordered, the Per Count UOM would be the Unit of Measure code for Kilograms.

nominationFlag1

Yes

String (1)

This field contains a flag that is used to indicate if the value of the cost component should be included in the calculation of another. Nomination flags are used to calculate the value of a Computation Value Base (CVB) which has the corresponding nomination flag set to Yes (Y). Valid values are: N/A (N) (the value of this component will not be included in CVBs which look at Nomination Flag 1), Add (+) (the value of this component will be added to CVBs which look at Nomination Flag 1), and Subtract (-) (the value of this component will be deducted from CVBs which look at Nomination Flag 1). For example, if cost component ABC has a + in Nomination Flag 1, then all CVBs that include Nomination Flag 1 will include this cost component value in their calculation basis.

inDuty

Yes

String (1)

If Import Management is enabled in Merchandising (i. e. system_options. import_ind = Y), the inDuty flag is used to indicate if the value of the cost component should be included in total duty.

nominationFlag3

Yes

String (1)

This field contains a flag that is used to indicate if the value of the cost component should be included in the calculation of another. Nomination flags are used to calculate the value of a Computation Value Base (CVB) which has the corresponding nomination flag set to Yes (Y). Valid values are: N/A (N) (the value of this component will not be included in CVBs which look at Nomination Flag 3), Add (+) (the value of this component will be added to CVBs which look at Nomination Flag 3), and Subtract (-) (the value of this component will be deducted from CVBs which look at Nomination Flag 3). For example, if cost component ABC has a + in Nomination Flag 3, then all CVBs that include Nomination Flag 3 will include this cost component value in their calculation basis.

inExpense

Yes

String (1)

The inExpense flag is used to indicate if the value of the cost component should be included in total expenses.

inAlc

Yes

String (1)

The inALC flag is used for cost components where the retailer does not expect to receive an actual value for the charge via an obligation or customs entry. The inALC flag allows the value of the cost component to be included in ALC via direct nomination and indicates to the system that the estimated value on the order should be used as the actual value as well because no other actual will be provided.

Sample Input Message

{
  "collectionSize": 1,
  "items": [
    {
      "orderNo": 464690012,
      "supplier": 2400,
      "currencyCode": "USD",
      "terms": "02",
      "notBeforeDate": "2001-12-31",
      "notAfterDate": "2001-12-31",
      "otbEowDate": "2001-12-31",
      "dept": null,
      "status": "A",
      "includeOnOrderInd": "Y",
      "writtenDate": "2001-12-31",
      "origin": "2",
      "ediPoInd": "Y",
      "preMarkInd": "Y",
      "approvedBy": null,
      "commentDesc": "Create Order",
      "dataLoadingDestination": "RMS",
      "masterOrderNo": null,
      "ladingPort": "7",
      "dischargePort": "480",
      "factory": "100",
      "agent": "007",
      "shipMethod": "32",
      "partnerType1": "AG",
      "partner1": "007",
      "partnerType2": "E",
      "partner2": "4678",
      "partnerType3": null,
      "partner3": null,
      "importCountry": "US",
      "purchaseType": "FOB",
      "paymentMethod": "LC",
      "titlePassLocationType": "FF",
      "titlePassLocation": "US",
      "purchaseOrderType": "4000",
      "orderType": "N/B",
      "buyer": 1000,
      "location": null,
      "locationType": null,
      "promotion": 41,
      "qualityControlInd": "Y",
      "freightTerms": "03",
      "backhaulType": null,
      "backhaulAllowance": null,
      "shipPayMethod": "PO",
      "transportationResponsibilityType": "FF",
      "transportationResponsibility": "US",
      "vendorOrderNo": "9987001",
      "freightContractNo": "111",
      "pickupLocation": null,
      "pickupNo": null,
      "pickupDate": null,
      "appointmentDateTime": "2001-12-31T23:59:59.123Z",
      "importType": "W",
      "importId": 10001,
      "clearingZoneId": null,
      "routingLocation": null,
      "reApproveInd": null,
      "earliestShipDate": "2001-12-31",
      "latestShipDate": "2001-12-31",
      "customFlexAttribute": [
        {
          "name": "REVIEW_DATE",
          "value": null,
          "valueDate": "2001-12-31"
        }
      ],
      "hts": [
        {
          "item": "103900095",
          "packItem": null,
          "hts": "9014111112",
          "status": "W",
          "originCountry": "IN",
          "importCountry": "US",
          "assessments": [
            {
              "component": "DTYCAUS",
              "computationValueBase": null,
              "componentRate": 12,
              "perCount": 1,
              "perCountUom": "EA",
              "nominationFlag1": "N",
              "inDuty": "+",
              "nominationFlag3": "-",
              "inExpense": "N",
              "inAlc": "N"
            }
          ]
        }
      ]
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Update Purchase Order Letters of Credit

Functional Area

Purchase Orders

Business Overview

This webservice is used to update letter of credit information within Merchandising when order payment type is Letter of Credit in order to keep it in sync with an external system that is responsible for maintaining purchase orders. It also updates order header information with the values provided in the request if the order has not yet been submitted or approved. For an existing order that has a payment type of Letter of Credit, the modification of header level order information is not necessary; however header level fields, particularly the payment type can be updated in case a letter of credit needs to be attached to the worksheet order that has an existing payment type other than Letter of Credit. Internally, the service sets the status of the order to Worksheet in order to accommodate the modification of letter of credit information for purchase orders in the system that have been submitted or approved. Validation of updated information is performed before automatic order re-approval is attempted without having to use the separate Update Purchase Order Service. If order has been previously approved and the order is attached to a Letter of Credit, only the Transshipment and Partial Shipment can be changed in the letter of credit details.

For more details on Purchase Orders, see the Create Purchase Order service description.

Service Type

PUT

ReST URL
MerchIntegrations/services/purchaseOrder/lettersOfCredit/update
Input Payload Details

Table 5-1398 Update - Object. See list of elements for detail

Element Name Required Data Type Description

collectionSize

Yes

Number (4)

Number of items in the collection.

items

Yes

Collection of Object

References a collection of letter of credit records.

Table 5-1399 Items - Object. See list of elements for detail

Element Name Required Data Type Description

orderNo

Yes

Number (12)

The unique identifier for the order.

supplier

No

Number (10)

The identifier of the supplier from which the order will be sourced. This cannot be modified if details exist for the PO.

currencyCode

No

String (3)

The code of the order's currency. If not populated, the supplier's currency will be used. This field can be modified if the order status is worksheet or approved and the order has not been shipped.

terms

No

String (15)

The sales terms of the order. If not populated on the create message, will default to the supplier's terms. This can be modified in worksheet or approved status.

notBeforeDate

No

date

The first date that delivery will be accepted. This can be modified in worksheet or approved status.

notAfterDate

No

date

The last date that delivery will be accepted. This can be modified in worksheet or approved status.

otbEowDate

No

date

The end of week date of the OTB bucket used. This can be modified in worksheet or approved status.

dept

No

Number (4)

The department in which are all the items on the order. This field is required if the system enforces single department ordering. This cannot be modified if details exist for the PO.

status

No

String (1)

The code for the status of the order. Valid values are 'W' worksheet and 'A' approved for PO creation. It is also possible to modify the status to 'C' closed.

includeOnOrderInd

No

String (1)

Indicates if the order should be included in on-order calculations. This can be modified in worksheet or approved status. Valid values are Y and N.

writtenDate

No

date

The date the order was created. If this field is not populated on the message it will default to the time of creation in RMS. It cannot be modified.

origin

No

String (2)

Indicates where the order originated. Valid values include: 2 - Manual, 6 - AIP generated order, 7 , 8, 12 - Consignment Vendor Order.

ediPoInd

No

String (1)

Indicates whether or not the order will be transmitted to the supplier via an Electronic Data Exchange transaction. Valid values are: Y = Submit via EDI, N = Do not use EDI.

preMarkInd

No

String (1)

This field indicated whether or not a supplier has agreed to break an order into separate boxes so that the boxes can be sent directly to stores. Valid values are Y and N.

approvedBy

No

String (254)

Indicates where the order was approved. It will be the user ID of the person approving the order.

commentDesc

No

String (2000)

Any comments pertaining to the order.

dataLoadingDestination

No

String (6)

This field indicates if the order will be created in RMS or the staging tables. Valid values are RMS or STG. If not defined, the default is STG.

masterOrderNo

No

Number (12)

This field indicates the master order number from which child records were created.

ladingPort

No

String (5)

This field indicates the port from which the items on the purchase order are shipped.

dischargePort

No

String (5)

This field indicates the port at which the items on the purchase order will enter the country of import.

factory

No

String (10)

This field indicates the factory at which the items on the purchase order are made.

agent

No

String (10)

This field indicates the agent that is used in the purchase of the items on the purchase order.

shipMethod

No

String (6)

This field indicates the method used to ship the items on the purchase order from the country of origin to the country of import.

partnerType1

No

String (6)

This field indicates Partner 1 Type.

partner1

No

String (10)

This field indicates the Additional Partner 1.

partnerType2

No

String (6)

This field indicates Partner 2 Type.

partner2

No

String (10)

This field indicates the Additional Partner 2.

partnerType3

No

String (6)

This field indicates Partner 3 Type.

partner3

No

String (10)

This field indicates the Additional Partner 3.

importCountry

No

String (3)

The identifier of the country into which the items on the order are being imported.

purchaseType

No

String (6)

This field indicates whats included in the suppliers cost of the item. Valid values include C (Cost), CI (Cost and Insurance), CIF (Cost, Insurance and Freight) and FOB (Free on Board).

paymentMethod

No

String (6)

This field indicates the default method for how purchase orders for this site will be paid. Valid values are in the code type PYMT(Payment Method). Examples are Open Account(OA), Letter of Credit(LC) and Wire Transfer(WT).

titlePassLocationType

No

String (2)

Contains the code indicating the type of location or point where ownership of merchandise changes hands from seller/supplier to buyer/retailer. Valid values are found under the FOBT code type. Examples are City and State (AC), Country Of Sourcing (CA) and City (CI).

titlePassLocation

No

String (250)

Contains the description of the location or point where ownership of merchandise changes hands from seller/supplier to buyer/retailer.

purchaseOrderType

No

String (4)

This field contains the value associated with the PO_TYPE for the order.

orderType

No

String (3)

Indicates the type of order and which Open To Buy bucket will be updated. Valid values include: N/B - Non Basic, ARB - Automatic Reorder of Basic, BRB - Buyer Reorder of Basic, DSD - Direct Store Delivery

buyer

No

Number (4)

Contains the number associated with the buyer for the order.

location

No

Number (10)

This field contains the location all items on the order will be delivered to if populated. i. e. It will mean a single location order.

locationType

No

String (1)

This field contains the type of location in the location field. Valid values are: Valid values are S (Store) or W (Warehouse).

promotion

No

Number (10)

Contains the RPCS offer ID associated with the order to provide a link between the order dialog and the promotions dialog.

qualityControlInd

No

String (1)

Determines whether or not quality control will be required when items for this order are received. Valid values are Y and N.

freightTerms

No

String (30)

Indicator that references what freight terms are related to the order.

backhaulType

No

String (6)

This field contains the type of backhaul allowance that will be applied to the order. Some examples are Calculated or Flat rate.

backhaulAllowance

No

Number (20,4)

This field will contain the backhaul allowance value.

shipPayMethod

No

String (2)

Code indicating the payment terms for freight charges associated with the order. Valid values include: CC - Collect, CF - Collect Freight Credited Back to Customer, DF - Defined by Buyer and Seller, MX - Mixed, PC - Prepaid but Charged to Customer, PO - Prepaid Only, PP - Prepaid by Seller.

transportationResponsibilityType

No

String (2)

Contains the code indicating the type of location or point at which the responsibility for transportation transfers from the seller/supplier to the buyer/retailer. Valid values are found under the FOBT code type. Examples are City and State (AC), Country Of Sourcing (CA) and Country (CC).

transportationResponsibility

No

String (250)

Contains the description of the location or point at which the responsibility for transportation transfers from the seller/supplier to the buyer/retailer.

vendorOrderNo

No

String (15)

Contains the vendors unique identifying number for an order. These orders may have originated by the vendor through the EDI process or this number can be associated to a Oracle Retail order when the order is created on-line.

freightContractNo

No

String (10)

The number of the contract with a shipper that will give specific freight rates. This field is only available when the system is running Import functionality.

pickupLocation

No

String (250)

Contains the location at which the order will be picked up, if the order is a Pickup order.

pickupNo

No

String (25)

Contains the reference number of the Pickup order.

pickupDate

No

date

Contains the date when the order can be picked up from the Supplier. This field is only required if the Purchase Type of the order is Pickup.

appointmentDateTime

No

date-time

This column will hold the date and time of the receiving appointment at the warehouse.

importType

No

String (1)

Valid values are IMporter and EXporter. This is the default importer/exporter assigned to the supplier of the Puchase order.

importId

No

Number (10)

This identifies the importer/exporter assigned to the supplier. This should reference the WH. WH folumn with foreign key created.

clearingZoneId

No

String (5)

This column will hold the clearing zone id.

routingLocation

No

String (5)

This is the default routing location for the import order. FK on OUTLOC. OUTLOC_ID.

reApproveInd

No

String (1)

This field indicates that the update to the corresponding purchase order needs to be performed, and then it should be approved again. Valid values are Y and N.

earliestShipDate

No

date

The date before which the item can not be shipped by the supplier.

latestShipDate

No

date

The date after which the item can not be shipped by the supplier.

customFlexAttribute

No

Collection of Object

References a collection of custom flexible attributes. This collection is treated as a single group and should include all named flexible attributes for the business entity. If any configured named attribute is missing from the input collection, its value will be set to NULL.

letterOfCredit

No

Record

References the letter of credit for the purchase order.

Table 5-1400 CustomFlexAttribute - Object. See list of elements for detail

Element Name Required Data Type Description

name

Yes

String (30)

Holds the attribute name.

value

No

String (250)

Holds the numeric or string value of the attribute.

valueDate

No

date

Holds the date value of the attribute.

Table 5-1401 LetterOfCredit - Object. See list of elements for detail

Element Name Required Data Type Description

lcReferenceId

No

Number (8)

This field contains the ID of the LC to which the order is attached.

lcGroupId

No

String (10)

This field contains an ID that can be used to group Orders together so that they can be attached to a single Letter of Credit.

applicant

Yes

String (10)

This field contains the ID of the applicant being used for the LC process.

beneficiary

Yes

Number (10)

This field contains the ID of the beneficiary being used for the LC process.

merchandiseDescription

Yes

String (2000)

This field holds a description of the merchandise on the order.

transshipmentInd

Yes

String (1)

This field indicates whether or not the LC to which the order is attached will allow the order to be transshipped. Valid values are 'Y'es and 'N'o.

partialShipmentInd

Yes

String (1)

This field indicates whether or not the LC to which the order is attached will allow the order to be partially shipped. Valid values are 'Y'es and 'N'o.

lcAttachedInd

Yes

String (1)

This field indicates whether or not the order has been attached to a Letter of Credit. Valid values are Y and N.

Sample Input Message

{
  "collectionSize": 1,
  "items": [
    {
      "orderNo": 464690012,
      "supplier": 2400,
      "currencyCode": "USD",
      "terms": "02",
      "notBeforeDate": "2001-12-31",
      "notAfterDate": "2001-12-31",
      "otbEowDate": "2001-12-31",
      "dept": null,
      "status": "A",
      "includeOnOrderInd": "Y",
      "writtenDate": "2001-12-31",
      "origin": "2",
      "ediPoInd": "Y",
      "preMarkInd": "Y",
      "approvedBy": null,
      "commentDesc": "Create Order",
      "dataLoadingDestination": "RMS",
      "masterOrderNo": null,
      "ladingPort": "7",
      "dischargePort": "480",
      "factory": "100",
      "agent": "007",
      "shipMethod": "32",
      "partnerType1": "AG",
      "partner1": "007",
      "partnerType2": "E",
      "partner2": "4678",
      "partnerType3": null,
      "partner3": null,
      "importCountry": "US",
      "purchaseType": "FOB",
      "paymentMethod": "LC",
      "titlePassLocationType": "FF",
      "titlePassLocation": "US",
      "purchaseOrderType": "4000",
      "orderType": "N/B",
      "buyer": 1000,
      "location": null,
      "locationType": null,
      "promotion": 41,
      "qualityControlInd": "Y",
      "freightTerms": "03",
      "backhaulType": null,
      "backhaulAllowance": null,
      "shipPayMethod": "PO",
      "transportationResponsibilityType": "FF",
      "transportationResponsibility": "US",
      "vendorOrderNo": "9987001",
      "freightContractNo": "111",
      "pickupLocation": null,
      "pickupNo": null,
      "pickupDate": null,
      "appointmentDateTime": "2001-12-31T23:59:59.123Z",
      "importType": "W",
      "importId": 10001,
      "clearingZoneId": null,
      "routingLocation": null,
      "reApproveInd": null,
      "earliestShipDate": "2001-12-31",
      "latestShipDate": "2001-12-31",
      "customFlexAttribute": [
        {
          "name": "REVIEW_DATE",
          "value": null,
          "valueDate": "2001-12-31"
        }
      ],
      "letterOfCredit": {
        "lcReferenceId": 10015000,
        "lcGroupId": null,
        "applicant": "500",
        "beneficiary": 2400,
        "merchandiseDescription": "Bath Essentials",
        "transshipmentInd": "Y",
        "partialShipmentInd": "Y",
        "lcAttachedInd": "Y"
      }
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ]
}

Update Purchase Orders

Functional Area

Purchase Orders

Business Overview

This webservice is used to update purchase orders in order to keep Merchandising in sync with an external system that is responsible for maintaining purchase orders. It can be used to modify only certain header level attributes of existing purchase orders. There are certain fields that are not allowed to be updated at header level depending on the status, and if these are still provided in the message, they will simply be ignored and no error message will be returned. Modification of the following header level fields is allowed while the order is submitted or approved, without having to set the order in worksheet status: status, not before date, not after date, terms, include on-order indicator, and comments.

For more details on Purchase Orders, see the Create Purchase Order service description.

Service Type

PUT

ReST URL
MerchIntegrations/services/purchaseOrders/update
Input Payload Details

Table 5-1402 Update - Object. See list of elements for detail

Element Name Required Data Type Description

items

Yes

Collection of Object

Table 5-1403 Items - Object. See list of elements for detail

Element Name Required Data Type Description

orderNo

Yes

Number (12)

The unique identifier for the order.

supplier

No

Number (10)

The identifier of the supplier from which the order will be sourced. This cannot be modified if details exist for the PO.

terms

No

String (15)

The sales terms of the order. If not populated on the create message, will default to the supplier's terms. This can be modified in worksheet or approved status.

notBeforeDate

No

date

The first date that delivery will be accepted. This can be modified in worksheet or approved status.

notAfterDate

No

date

The last date that delivery will be accepted. This can be modified in worksheet or approved status.

otbEowDate

No

date

The end of week date of the OTB bucket used. This can be modified in worksheet or approved status.

dept

No

Number (4)

The department in which are all the items on the order. This field is required if the system enforces single department ordering. This cannot be modified if details exist for the PO.

status

No

String (1)

The code for the status of the order. Valid values are 'W' worksheet and 'A' approved for PO creation. It is also possible to modify the status to 'C' closed.

exchangeRate

No

Number (20,10)

The rate of exchange for the PO used between the order and primary currencies. This field can be modified if the order status is worksheet or approved and the order has not been shipped..

includeOnOrderInd

No

String (1)

Indicates if the order should be included in on-order calculations. This can be modified in worksheet or approved status. Valid values are Y and N.

writtenDate

No

date

The date the order was created. If this field is not populated on the message it will default to the time of creation in RMS. It cannot be modified.

origin

No

String (2)

Indicates where the order originated. Valid values include: 2 - Manual, 6 - AIP generated order, 7 , 8, 12 - Consignment Vendor Order.

ediPoInd

No

String (1)

Indicates whether or not the order will be transmitted to the supplier via an Electronic Data Exchange transaction. Valid values are: Y = Submit via EDI, N = Do not use EDI.

preMarkInd

No

String (1)

This field indicated whether or not a supplier has agreed to break an order into separate boxes so that the boxes can be sent directly to stores. Valid values are Y and N.

approvedBy

No

String (254)

Indicates where the order was approved. It will be the user ID of the person approving the order.

commentDesc

No

String (2000)

Any comments pertaining to the order.

dataLoadingDestination

No

String (6)

This field indicates if the order will be created in RMS or the staging tables. Valid values are RMS or STG. If not defined, the default is STG.

masterOrderNo

No

Number (12)

This field indicates the master order number from which child records were created.

ladingPort

No

String (5)

This field indicates the port from which the items on the purchase order are shipped.

dischargePort

No

String (5)

This field indicates the port at which the items on the purchase order will enter the country of import.

factory

No

String (10)

This field indicates the factory at which the items on the purchase order are made.

agent

No

String (10)

This field indicates the agent that is used in the purchase of the items on the purchase order.

shipMethod

No

String (6)

This field indicates the method used to ship the items on the purchase order from the country of origin to the country of import.

partnerType1

No

String (6)

This field indicates Partner 1 Type.

partner1

No

String (10)

This field indicates the Additional Partner 1.

partnerType2

No

String (6)

This field indicates Partner 2 Type.

partner2

No

String (10)

This field indicates the Additional Partner 2.

partnerType3

No

String (6)

This field indicates Partner 3 Type.

partner3

No

String (10)

This field indicates the Additional Partner 3.

purchaseType

No

String (6)

This field indicates what is included in the suppliers cost of the item. Valid values include C (Cost), CI (Cost and Insurance), CIF (Cost, Insurance and Freight) and FOB (Free on Board).

paymentMethod

No

String (6)

This field indicates the default method for how purchase orders for this site will be paid. Valid values are in the code type PYMT(Payment Method). Examples are Open Account(OA), Letter of Credit(LC) and Wire Transfer(WT).

titlePassLocationType

No

String (2)

Contains the code indicating the type of location or point where ownership of merchandise changes hands from seller/supplier to buyer/retailer. Valid values are found under the FOBT code type. Examples are City and State (AC), Country Of Sourcing (CA) and City (CI).

titlePassLocation

No

String (250)

Contains the description of the location or point where ownership of merchandise changes hands from seller/supplier to buyer/retailer.

purchaseOrderType

No

String (4)

This field contains the value associated with the PO_TYPE for the order.

orderType

No

String (3)

Indicates the type of order and which Open To Buy bucket will be updated. Valid values include: N/B - Non Basic, ARB - Automatic Reorder of Basic, BRB - Buyer Reorder of Basic, DSD - Direct Store Delivery

buyer

No

Number (4)

Contains the number associated with the buyer for the order.

location

No

Number (10)

This field contains the location all items on the order will be delivered to if populated. i. e. It will mean a single location order.

locationType

No

String (1)

This field contains the type of location in the location field. Valid values are: Valid values are S (Store) or W (Warehouse).

promotion

No

Number (10)

Contains the RPCS offer ID associated with the order to provide a link between the order dialog and the promotions dialog.

qualityControlInd

No

String (1)

Determines whether or not quality control will be required when items for this order are received. Valid values are Y and N.

freightTerms

No

String (30)

Indicator that references what freight terms are related to the order.

backhaulType

No

String (6)

This field contains the type of backhaul allowance that will be applied to the order. Some examples are Calculated or Flat rate.

backhaulAllowance

No

Number (20,4)

This field will contain the backhaul allowance value.

shipPayMethod

No

String (2)

Code indicating the payment terms for freight charges associated with the order. Valid values include: CC - Collect, CF - Collect Freight Credited Back to Customer, DF - Defined by Buyer and Seller, MX - Mixed, PC - Prepaid but Charged to Customer, PO - Prepaid Only, PP - Prepaid by Seller.

transportationResponsibilityType

No

String (2)

Contains the code indicating the type of location or point at which the responsibility for transportation transfers from the seller/supplier to the buyer/retailer. Valid values are found under the FOBT code type. Examples are City and State (AC), Country Of Sourcing (CA) and Country (CC).

transportationResponsibility

No

String (250)

Contains the description of the location or point at which the responsibility for transportation transfers from the seller/supplier to the buyer/retailer.

vendorOrderNo

No

String (15)

Contains the vendors unique identifying number for an order. These orders may have originated by the vendor through the EDI process or this number can be associated to an Oracle Retail order when the order is created on-line.

freightContractNo

No

String (10)

The number of the contract with a shipper that will give specific freight rates. This field is only available when the system is running Import functionality.

pickupLocation

No

String (250)

Contains the location at which the order will be picked up, if the order is a Pickup order.

pickupNo

No

String (25)

Contains the reference number of the Pickup order.

pickupDate

No

date

Contains the date when the order can be picked up from the Supplier. This field is only required if the Purchase Type of the order is Pickup.

appointmentDateTime

No

date-time

This column will hold the date and time of the receiving appointment at the warehouse.

importType

No

String (1)

Valid values are IMporter and EXporter. This is the default importer/exporter assigned to the supplier of the Purchase order.

importId

No

Number (10)

This identifies the importer/exporter assigned to the supplier. This should reference the WH. WH column with foreign key created.

clearingZoneId

No

String (5)

This column will hold the clearing zone id.

routingLocation

No

String (5)

This is the default routing location for the import order. FK on OUTLOC. OUTLOC_ID.

reApproveInd

No

String (1)

This field indicates that the update to the corresponding purchase order needs to be performed, and then it should be approved again. Valid values are Y and N.

earliestShipDate

No

date

The date before which the item cannot be shipped by the supplier.

latestShipDate

No

date

The date after which the item cannot be shipped by the supplier.

fileId

No

String (20)

In order to support supplier pooling via the buyer worksheet, the recommended order quantities for the individual suppliers are linked together for logistical purposes while generating orders from the worksheet based on this identifier.

customFlexAttribute

No

Collection of Object

References a collection of custom flexible attributes. This collection is treated as a single group and should include all named flexible attributes for the business entity. If any configured named attribute is missing from the input collection, its value will be set to NULL.

Table 5-1404 CustomFlexAttribute - Object. See list of elements for detail

Element Name Required Data Type Description

name

Yes

String (30)

Holds the attribute name.

value

No

String (250)

Holds the numeric or string value of the attribute.

valueDate

No

date

Holds the date value of the attribute.

Sample Input Message

{
  "items": [
    {
      "orderNo": 464690012,
      "supplier": 2400,
      "terms": "02",
      "notBeforeDate": "2001-12-31",
      "notAfterDate": "2001-12-31",
      "otbEowDate": "2001-12-31",
      "dept": null,
      "status": "A",
      "exchangeRate": 2,
      "includeOnOrderInd": "Y",
      "writtenDate": "2001-12-31",
      "origin": "2",
      "ediPoInd": "Y",
      "preMarkInd": "Y",
      "approvedBy": null,
      "commentDesc": "Create Order",
      "dataLoadingDestination": "RMS",
      "masterOrderNo": null,
      "ladingPort": "7",
      "dischargePort": "480",
      "factory": "100",
      "agent": "007",
      "shipMethod": "32",
      "partnerType1": "AG",
      "partner1": "007",
      "partnerType2": "E",
      "partner2": "4678",
      "partnerType3": null,
      "partner3": null,
      "purchaseType": "FOB",
      "paymentMethod": "LC",
      "titlePassLocationType": "FF",
      "titlePassLocation": "US",
      "purchaseOrderType": "4000",
      "orderType": "N/B",
      "buyer": 1000,
      "location": null,
      "locationType": null,
      "promotion": 41,
      "qualityControlInd": "Y",
      "freightTerms": "03",
      "backhaulType": null,
      "backhaulAllowance": null,
      "shipPayMethod": "PO",
      "transportationResponsibilityType": "FF",
      "transportationResponsibility": "US",
      "vendorOrderNo": "9987001",
      "freightContractNo": "111",
      "pickupLocation": null,
      "pickupNo": null,
      "pickupDate": null,
      "appointmentDateTime": "2001-12-31T23:59:59.123Z",
      "importType": "W",
      "importId": 10001,
      "clearingZoneId": null,
      "routingLocation": null,
      "reApproveInd": null,
      "earliestShipDate": "2001-12-31",
      "latestShipDate": "2001-12-31",
      "fileId": "String",
      "customFlexAttribute": [
        {
          "name": "REVIEW_DATE",
          "value": null,
          "valueDate": "2001-12-31"
        }
      ]
    }
  ]
}
Response Code: 200 (Success)

Sample Response Message

{
  "status": "SUCCESS",
  "message": "Service call is successful"
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element "validationErrors" will be present when input payload or input parameters are not as per the schema definition of this service. The element "businessError" will be present if the payload passes schema validation but exception is caught while processing business logic.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ],
  "businessError": [
    "Error message"
  ]
}