Receive Shipped Items

You can use a REST API to get the lines of a purchase order, and then verify receipt of these lines.

Let's discuss these scenarios:

  • Get the purchase order lines.

  • Post the receipt.

Get the Purchase Order Lines

Assume Amy Smith is an office supply retailer who uses a mobile client to connect to your partner application. The client uses the Purchase Order Lines for Receiving resource to get the order lines for purchase order 12345.

Flow where the client uses the Purchase Order Lines for Receiving resource to get the order lines for purchase order 12345.

Here's a typical application processing flow for the scenario:

  1. You get the order lines for purchase order 12345.

  2. The response payload includes details that describe the results of the request.

  3. Your partner application extracts the values for the following attributes from the response payload, and then displays them in fields in the client.

    Attribute

    Description

    PurchaseOrder

    Number that identifies the purchase order. For example, 12345.

    POLineId

    Uniquely identifies the purchase order line to receive. For example, 2.

    SupplierItem

    Item number from the purchase order line. For example, CRNA24.

    ItemDescription

    Text description of the item. For example, College Rule Notebook, A24.

Example URL

Use this resource URL format.

GET

curl -u username:password "https://servername/fscmRestApi/resources/version/purchaseOrderLinesForReceiving"

Example Response

Here's an example of the response body in JSON format.

{ 
	"items" : [ {
		"PurchaseOrder" : "1002191",
		"POHeaderId" : 424114,
		"PurchaseOrderLine" : 1,
		"POLineId" : 382145,
		"ItemDescription" : "College Rule Notebook, A24",
		"SupplierItem" : null,
		"OrganizationCode" : "M1",
		"OrganizationId" : 207
	}, {
	} ],
	"count" : 1,
	"hasMore" : true,
	"limit" : 25,
	"offset" : 0,
	"links" : [ {
		"rel" : "self",
		"href" : "https://servername/fscmRestApi/resources/version/purchaseOrderLinesForReceiving",
		"name" : "purchaseOrderLinesForReceiving",
		"kind" : "collection"
	} ]
}

Post the Receipt

Amy uses the partner application to receive the shipment for purchase order 12345, to receive one case of College Rule Notebook, A24, and then uses the REST API to post the receipt.

Illustrates flow where your customer uses the partner application to receive the shipment for purchase order 12345, to receive one case of College Rule Notebook, A24, and then uses REST API to post the receipt.

Here's a typical application processing flow for the scenario:

  1. Amy uses the client to enter the quantity received.

  2. The REST service creates a receipt in organization M1, for vendor Rapid Office Supply, for item CRNA24.

  3. This response includes details that describe the results of the request.

  4. Your partner application extracts the values for the following attributes from the response payload, and then displays them in fields in the client. This table shows the values of the receipts resource.

    Note:

    Some resources contain only a few attributes. Others might contain several hundred attributes. You can pick and choose the ones to process.

    Attribute

    Description

    CustomerPartyName

    Name of the customer.

    EmployeeName

    Name of the employee who performed the receiving transaction.

    ItemDescription

    Description of the item. For a purchase order receipt, this attribute describes the item on the purchase order line. For other receipts, this attribute describes the inventory item.`

    ItemNumber

    Number of the item.

    OrganizationCode

    Abbreviation that identifies the receiving organization.

    PackingSlip

    Packing slip number for the container that contains this item.

    Quantity

    Transaction quantity in the unit of measure that the receiving transaction uses.

    ReceiptSourceCode

    Source of the shipment or the receipt. Values include VENDOR, INVENTORY, TRANSFER ORDER, or CUSTOMER.

    SourceDocumentCode

    Abbreviation that identifies the type of source document. The RCV_SOURCE_DOCUMENT_TYPE lookup defines the values that you can use with this attribute.

    UnitOfMeasure

    Unit of measure for the receiving transaction.

    VendorName

    Name of the supplier.

    VendorSiteCode

    Abbreviation that identifies the supplier site for a business unit.

Example URL

Use this resource URL format.

POST

curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' 
"https://servername/fscmRestApi/resources/version/receipts"

Example Request

Here's an example of the request body in JSON format.

{
    	"receiptHeaders": [     	   
		{
           	 "OrganizationCode": "M1",
          	  "VendorName": "Rapid Office Supply",
            	  "VendorSiteCode": "FRESNO",
                "EmployeeId": 4426,
                "BusinessUnit" : "Retail Operations",
                "ReceiptSourceCode" : "VENDOR
                "receiptLines": [
                {
                    "BusinessUnit" : "Retail Operations",
                    "DestinationTypeCode" : "RECEIVING",
                    "DocumentLineNumber" : 1,
                    "DocumentNumber" : 1000125,
                    "ItemNumber" : "CRNA24",
                    "PrimaryQuantity": 1,
                    "EmployeeId": 4426,
                    "OrganizationCode": "M1",
                    "Quantity": 1,
                    "UOMCode": "Case",
                    "UnitOfMeasure" : "Each",
                    "ReceiptSourceCode" : "VENDOR",
                    "SoldtoLegalEntity" : "Retail Operations",
                    "SourceDocumentCode" : "PO",
                    "AutoTransactCode" : "RECEIVE",
                    "TransactionType" : "RECEIVE"
                }              
            ]
        }
    ]	
}

Example Response

Here's an example of the response body in JSON format.

{
  "GroupId" : 56391,
  "ReturnStatus" : "SUCCESS",
  "ErrorCode" : null,
  "ErrorExplanation" : null,
  "ErrorUniqueHeaderId" : 0,
  "ErrorUniqueTransactionId" : "0",
  "receiptHeaders" : [ {
    "UniqueHeaderId" : 300100090015951,
    "ReceiptSourceCode" : "VENDOR",
    "TransactionDate" : null,
    "ShipmentNumber" : null,
    "ReceiptNumber" : null,
    "ReceiptHeaderId" : null,
    "VendorName" : "Rapid Office Supply",
    "VendorNumber" : null,
    "VendorId" : null,
    "VendorSiteCode" : "FRESNO",
    "VendorSiteId" : null,
    "BUId" : null,
    "BusinessUnit" : "Retail Operations",
    "OrganizationCode" : "M1",
    "OrganizationId" : null,
    "ShippedDate" : null,
    "FreightCarrierId" : null,
    "FreightCarrierName" : null,
    "WaybillAirbillNumber" : null,
    "NumberOfPackingUnits" : null,
    "BillOfLading" : null,
    "PackingSlip" : null,
    "Comments" : null,
    "CustomerPartyName" : null,
    "CustomerId" : null,
    "EmployeeName" : null,
    "EmployeeId" : 4426,
    "FromOrganizationCode" : null,
    "FromOrganizationId" : null,
    "RADOOSourceSystemId" : null,
    "RADOOSourceSystemName" : null,
    "receiptLines" : [ {
      "UniqueTransactionId" : 300100090015952,
      "TransactionType" : "RECEIVE",
      "AutoTransactCode" : "RECEIVE",
      "TransactionDate" : "2016-06-05T23:11:47-07:00",
      "OrganizationCode" : "M1",
      "OrganizationId" : null,
      "ItemDescription" : null,
      "ItemId" : null,
      "ItemNumber" : "CRNA24",
      "ItemRevision" : null,
      "ReceiptSourceCode" : "VENDOR",
      "SourceDocumentCode" : "PO",
      "DocumentNumber" : "1000125",
      "DocumentLineNumber" : 1,
      "DocumentScheduleNumber" : null,
      "DocumentDistributionNumber" : null,
      "PODistributionId" : null,
      "POHeaderId" : null,
      "POLineId" : null,
      "POLineLocationId" : null,
      "ShipmentHeaderId" : null,
      "ShipmentLineId" : null,
      "ShipmentNumber" : null,
      "ASNLineNumber" : null,
      "TransferOrderHeaderId" : null,
      "TransferOrderLineId" : null,
      "SoldtoLegalEntity" : "Retail Operations",
      "SoldtoLegalEntityId" : null,
      "DestinationTypeCode" : "RECEIVING",
      "Subinventory" : null,
      "Locator" : null,
      "LocatorId" : null,
      "Quantity" : 3,
      "UnitOfMeasure" : "Each",
      "UOMCode" : "Case",
      "PrimaryQuantity" : 1,
      "PrimaryUOMCode" : null,
      "PrimaryUnitOfMeasure" : null,
      "SecondaryUOMCode" : null,
      "SecondaryUnitOfMeasure" : null,
      "SecondaryQuantity" : null,
      "EmployeeId" : 4426,
      "EmployeeName" : null,
      "ParentTransactionId" : null,
      "SourceTransactionNumber" : null,
      "ParentSourceTransactionNumber" : null,
      "InterfaceSourceCode" : null,
      "InterfaceSourceLineId" : null,
      "ShipToLocationCode" : null,
      "ShipToLocationId" : null,
      "DeliverToLocationCode" : null,
      "DeliverToLocationId" : null,
      "DeliverToPersonId" : null,
      "DeliverToPersonName" : null,
      "RoutingHeaderId" : null,
      "InspectionQualityCode" : null,
      "Exception" : null,
      "CreateDebitMemo" : null,
      "RMAReference" : null,
      "PhysicalMaterialReturnRequired" : null,
      "ReceiptAdviceDocumentScheduleNumber" : null,
      "ReceiptAdviceDocumentLineNumber" : null,
      "ReceiptAdviceDocumentNumber" : null,
      "ReceiptAdviceHeaderId" : null,
      "ReceiptAdviceLineId" : null,
      "CustomerPartyName" : null,
      "CustomerId" : null,
      "CustomerItemNumber" : null,
      "CustomerItemId" : null,
      "Amount" : null,
      "CountryOfOriginCode" : null,
      "CurrencyCode" : null,
      "CurrencyConversionDate" : null,
      "CurrencyConversionRate" : null,
      "CurrencyConversionType" : null,
      "FromOrganizationCode" : null,
      "FromOrganizationId" : null,
      "ContainerNumber" : null,
      "SubstituteItemNumber" : null,
      "SubstituteItemId" : null,
      "SubstituteUnorderedCode" : null,
      "VendorName" : null,
      "VendorId" : null,
      "VendorNumber" : null,
      "VendorSiteCode" : null,
      "VendorSiteId" : null,
      "BusinessUnit" : "Retail Operations",
      "BUId" : null,
      "VendorItemNumber" : null,
      "ConsignmentLine" : null,
      "ReasonId" : null,
      "ReasonName" : null,
      "PackingSlip" : null,
      "Comments" : null,
      "FromSubinventory" : null,
      "FromLocator" : null,
      "FromLocatorId" : null
    } ]
  } ]
}