Get all costs
/fscmRestApi/resources/11.13.18.05/itemCosts
Request
-
expand: string
When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". More than one child can be specified using comma as a separator. Example: ?expand=Employees,Localizations. Nested children can also be provided following the format "Child.NestedChild" (Example: ?expand=Employees.Managers). If a nested child is provided (Example: Employees.Managers), the missing children will be processed implicitly. For example, "?expand=Employees.Managers" is the same as "?expand=Employees,Employees.Managers" (which will expand Employees and Managers).
-
fields: string
This parameter filters the resource fields. Only the specified fields are returned, which means that if no fields are specified, no fields are returned (useful to get only the links). If an indirect child resource is provided (Example: Employees.Managers), the missing children will be processed implicitly. For example, "?fields=Employees.Managers:Empname" is the same as "?fields=;Employees:;Employees.Managers:Empname" (which will only return the "Empname" field for Managers). the value of this query parameter is a list of resource fields. The attribute can be a direct (Example: Employees) or indirect (Example: Employees.Managers) child. It cannot be combined with expand query parameter. If both are provided, only fields will be considered.
Format: ?fields=Attribute1,Attribute2
Format for fields in child resource: ?fields=Accessor1:Attribute1,Attribute2 -
finder: string
Used as a predefined finder to search the collection.
Format: ?finder=<finderName>;<variableName>=<variableValue>,<variableName2>=<variableValue2>
The following are the available finder names and corresponding finder variables:- PrimaryKey: Finds item costs according to the primary key.
Finder Variables:- CostBookId; integer; Value that uniquely identifies the cost book.
- CostMethod; string; Cost method for the inventory item.
- CostOrganizationId; integer; Value that uniquely identifies the cost organization.
- ItemId; integer; Value that uniquely identifies the item.
- TransactionId; integer; Value that uniquely identifies the transaction
- ValuationUnitId; integer; Value that uniquely identifies the valuation unit.
- findItemCostAdjustmentDetails: Finds eligible transactions of an item for cost adjustment. To use this finder, you need the following values: Cost Organization, Cost book, and Item.
Finder Variables:- bindCostBook; string; Name of the cost book.
- bindCostBookId; integer; Value that uniquely identifies the cost book.
- bindCostOrg; string; Name of the cost organization.
- bindCostOrgId; integer; Value that uniquely identifies the cost organization.
- bindItem; string; Name of the inventory item.
- bindItemId; integer; Value that uniquely identifies the item.
- bindValStructureCode; string; Name of the valuation structure.
- bindValuationUnit; string; Name of the valuation unit.
- findItemCosts: Finds costs for an inventory item. To use this finder, you need one of the following values: Cost Organization, or Cost book, or Item. Item is the recommended filter parameter to achieve better performance.
Finder Variables:- bindCategoryName; string; Inventory item category.
- bindCostBook; string; Name of the cost book.
- bindCostBookId; integer; Value that uniquely identifies the cost book.
- bindCostDate; string; Cost date of the inventory item.
- bindCostMethod; string; Cost method of the inventory item.
- bindCostOrg; string; Name of the cost organization.
- bindCostOrgId; integer; Value that uniquely identifies the cost organization.
- bindCostProfile; string; Name of the cost profile.
- bindEffectiveEndDate; string; Effective end date of the item cost.
- bindEffectiveStartDate; string; Effective start date of the item cost.
- bindItem; string; Name of the inventory item.
- bindItemDescription; string; Description of the inventory item.
- bindItemId; integer; Value that uniquely identifies the item.
- bindReceiptNumber; string; Number that identifies the receipt.
- bindTotalUnitCost; number; Total unit cost for the inventory item.
- bindValStructureCode; string; Name of the valuation structure.
- bindValuationUnit; string; Name of the valuation unit.
- PrimaryKey: Finds item costs according to the primary key.
-
limit: integer
This parameter restricts the number of resources returned inside the resource collection. If the limit exceeds the resource count then the framework will only return the available resources.
-
links: string
This parameter can be used to show only certain links while accessing a singular resource or a resource collection. The parameter value format is a comma-separated list of : <link_relation>
Example:
self,canonical -
offset: integer
Used to define the starting position of the resource collection. If offset exceeds the resource count then no resources are returned. Default value is 0.
-
onlyData: boolean
The resource item payload will be filtered in order to contain only data (no links section, for example).
-
orderBy: string
This parameter orders a resource collection based on the specified fields. The parameter value is a comma-separated string of attribute names, each optionally followed by a colon and "asc" or "desc". Specify "asc" for ascending and "desc" for descending. The default value is "asc". For example, ?orderBy=field1:asc,field2:desc
-
q: string
This query parameter defines the where clause. The resource collection will be queried using the provided expressions. The value of this query parameter is one or more expressions. Example: ?q=Deptno>=10 and <= 30;Loc!=NY
Format: ?q=expression1;expression2
You can use these queryable attributes to filter this collection resource using the q query parameter:- CostAsOfDate; string; Item cost as of the date.
- CostBook; string; Cost book name. Use the Manage Cost Books page in the Setup and Maintenance work area to examine and update the value for this attribute.
- CostBookId; integer; Value that uniquely identifies the cost book.
- CostChange; number; Change in cost of the inventory item.
- CostMethod; string; Cost method of the inventory item. You can use the following values for this attribute: Actual Cost, Perpetual Average, or Standard Cost.
- CostMethodCode; string; Abbreviation that identifies the cost method.
- CostOrganizationCode; string; Abbreviation that identifies the cost organization.
- CostOrganizationId; integer; Value that uniquely identifies the cost organization.
- CostOrganizationName; string; Cost organization name. Use the Manage Cost Organizations page in the Setup and Maintenance work area to examine and update the value for this attribute.
- CostProfile; string; Cost profile of the inventory item. Use the Manage Item Cost Profiles page in the Setup and Maintenance work area to examine and update the value for this attribute.
- CostProfileId; integer; Value that uniquely identifies the cost profile.
- CurrencyCode; string; Abbreviation that identifies the currency.
- EffectiveEndDate; string; End date of the item cost.
- EffectiveStartDate; string; Start date of the item cost.
- ItemCategory; string; Category of the inventory item.
- ItemCategoryId; number; Value that uniquely identifies the category of the inventory item.
- ItemDescription; string; Inventory item description.
- ItemId; integer; Value that uniquely identifies the inventory item.
- ItemNumber; string; Inventory item name.
- QuantityOnhand; number; On-hand quantity of the inventory item.
- ReceiptNumber; string; Number that identifies the receipt.
- TotalUnitCost; number; Total unit cost of the inventory item.
- TransactionId; integer; Value that uniquely identifies the transaction in costing.
- UOMCode; string; Abbreviation that identifies the unit of measure.
- UOMName; string; Unit of measure.
- ValuationStructureCode; string; Valuation structure for the item cost. Use the Manage Valuation Structures page in the Setup and Maintenance work area to examine and update the value for this attribute.
- ValuationStructureId; integer; Value that uniquely identifies the valuation structure.
- ValuationUnit; string; Valuation unit for the item cost. Use the Manage Valuation Units page in the Setup and Maintenance work area to examine and update the value for this attribute.
- ValuationUnitId; integer; Value that uniquely identifies the valuation unit.
-
totalResults: boolean
The resource collection representation will include the "estimated row count" when "?totalResults=true", otherwise the count is not included. The default value is "false".
-
Metadata-Context:
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version:
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
There's no request body for this operation.
Back to TopResponse
- application/json
Default Response
-
Metadata-Context:
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version:
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
object
-
count(required): integer
The number of resource instances returned in the current range.
-
hasMore(required): boolean
Indicates whether more resources are available on the server than the subset returned in the response. If the value is true, then there are more resources to retrieve from the server. The default value is false.
-
items: array
Items
Title:
Items
The items in the collection. -
limit(required): integer
The actual paging size used by the server.
-
links(required): array
Links
Title:
Links
The link relations associated with the resource instance. -
offset(required): integer
The offset value used in the current page.
-
totalResults: integer
The estimated row count when "?totalResults=true", otherwise the count is not included.
array
Links
object
-
CostAsOfDate: string
(date-time)
Title:
Cost As-of Date
Read Only:true
Item cost as of the date. -
CostBook: string
Title:
Cost Book
Read Only:true
Maximum Length:30
Cost book name. Use the Manage Cost Books page in the Setup and Maintenance work area to examine and update the value for this attribute. -
CostBookId: integer
(int64)
Title:
Cost Book ID
Read Only:true
Value that uniquely identifies the cost book. -
CostChange: number
Title:
Cost Change
Read Only:true
Change in cost of the inventory item. -
costDetails: array
Details
Title:
Details
The perpetual average cost at cost-element level for an inventory item in a cost organization and cost book. -
CostMethod: string
Title:
Cost Method
Read Only:true
Maximum Length:17
Cost method of the inventory item. You can use the following values for this attribute: Actual Cost, Perpetual Average, or Standard Cost. -
CostMethodCode: string
Title:
Cost Method Code
Read Only:true
Maximum Length:17
Abbreviation that identifies the cost method. -
CostOrganizationCode: string
Title:
Cost Organization Code
Read Only:true
Maximum Length:150
Abbreviation that identifies the cost organization. -
CostOrganizationId: integer
(int64)
Title:
Cost Organization ID
Read Only:true
Value that uniquely identifies the cost organization. -
CostOrganizationName: string
Title:
Cost Organization Name
Read Only:true
Maximum Length:240
Cost organization name. Use the Manage Cost Organizations page in the Setup and Maintenance work area to examine and update the value for this attribute. -
CostProfile: string
Title:
Cost Profile
Read Only:true
Maximum Length:30
Cost profile of the inventory item. Use the Manage Item Cost Profiles page in the Setup and Maintenance work area to examine and update the value for this attribute. -
CostProfileId: integer
(int64)
Title:
Cost Profile ID
Read Only:true
Value that uniquely identifies the cost profile. -
CurrencyCode: string
Title:
Currency Code
Read Only:true
Maximum Length:30
Abbreviation that identifies the currency. -
EffectiveEndDate: string
(date)
Title:
Effective End Date
Read Only:true
End date of the item cost. -
EffectiveStartDate: string
(date)
Title:
Effective Start Date
Read Only:true
Start date of the item cost. -
ItemCategory: string
Title:
Item Category
Read Only:true
Maximum Length:250
Category of the inventory item. -
ItemCategoryId: number
Title:
Item Category ID
Read Only:true
Value that uniquely identifies the category of the inventory item. -
ItemDescription: string
Title:
Item Description
Read Only:true
Maximum Length:240
Inventory item description. -
ItemId: integer
(int64)
Title:
Item ID
Read Only:true
Value that uniquely identifies the inventory item. -
ItemNumber: string
Title:
Item Number
Read Only:true
Maximum Length:300
Inventory item name. -
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
QuantityOnhand: number
Title:
On-Hand Quantity
Read Only:true
On-hand quantity of the inventory item. -
ReceiptNumber: string
Title:
Receipt Number
Read Only:true
Maximum Length:30
Number that identifies the receipt. -
TotalUnitCost: number
Title:
Total Unit Cost
Read Only:true
Total unit cost of the inventory item. -
TransactionId: integer
Title:
Transaction ID
Read Only:true
Value that uniquely identifies the transaction in costing. -
UOMCode: string
Title:
UOM Code
Read Only:true
Maximum Length:30
Abbreviation that identifies the unit of measure. -
UOMName: string
Title:
UOM Name
Read Only:true
Maximum Length:25
Unit of measure. -
ValuationStructureCode: string
Title:
Valuation Structure Code
Read Only:true
Maximum Length:30
Valuation structure for the item cost. Use the Manage Valuation Structures page in the Setup and Maintenance work area to examine and update the value for this attribute. -
ValuationStructureId: integer
(int64)
Title:
Valuation Structure ID
Read Only:true
Value that uniquely identifies the valuation structure. -
ValuationUnit: string
Title:
Valuation Unit
Read Only:true
Maximum Length:1000
Valuation unit for the item cost. Use the Manage Valuation Units page in the Setup and Maintenance work area to examine and update the value for this attribute. -
ValuationUnitId: integer
(int64)
Title:
Valuation Unit ID
Read Only:true
Value that uniquely identifies the valuation unit.
array
Details
array
Links
object
-
CostElement: string
Title:
Cost Element
Read Only:true
Maximum Length:30
Cost element mapped to the item. Use the Manage Cost Elements page in the Setup and Maintenance work area to examine and update the value for this attribute. -
CostElementId: integer
(int64)
Title:
Cost Element ID
Read Only:true
Value that uniquely identifies the cost element. -
CostElementType: string
Title:
Cost Element Type
Read Only:true
Maximum Length:30
Type of the cost element. -
CostPercent: number
Title:
Cost Breakdown
Read Only:true
Breakdown percentage of the total cost of the inventory item according to the cost element. -
CurrencyCode: string
Title:
Currency Code
Read Only:true
Maximum Length:30
Abbreviation that identifies the currency. -
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
UnitCostAverage: number
Title:
Unit Cost
Read Only:true
Unit cost for the cost element.
array
Links
object
-
href: string
Title:
hyperlink reference
The URI to the related resource. -
kind: string
Title:
kind
Allowed Values:[ "collection", "item", "describe", "other" ]
The kind of the related resource. -
name: string
Title:
name
The name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relation
Allowed Values:[ "self", "lov", "parent", "canonical", "child", "enclosure", "action", "custom" ]
The name of the relation to the resource instance. Example: self.
object
-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
Examples
This example describes how to get all costs.
Example 1 cURL Command
Use the following cURL command to submit a request on the REST resource:
curl -u username:password "https://servername/fscmRestApi/resources/version/itemCosts"
Example 1 Response Body
The following shows an example of the response body in JSON format.
{ "items": [ { "CostOrganizationId": 300100090391535, "CostOrganizationName": "ZBR1-CO", "CostOrganizationCode": "ZBR1-CO", "CostBookId": 300100089910740, "CostBook": "ZBR-Avg", "CostProfile": "ZDQ-Avg", "CostProfileId": 300100052350627, "ItemCategory": "Uncategorized", "ItemCategoryId": 1396, "ItemId": 300100127166055, "ItemNumber": "AS88871", "ItemDescription": "AS88871 - Lot Item", "CostMethodCode": "PERPETUAL_AVERAGE", "ValuationStructureId": 100000011846089, "ValuationStructureCode": "ZCST-Inv-Org-Asset", "ValuationUnitId": 300100089910846, "ValuationUnit": "ZBR1\\-CO-BR1", "ReceiptNumber": null, "TransactionId": 885087, "CurrencyCode": "BRL", "UOMName": "Each", "UOMCode": "Ea", "TotalUnitCost": 0, "CostChange": 0, "CostAsOfDate": "2018-01-16T06:45:06+00:00", "EffectiveStartDate": null, "EffectiveEndDate": null, "QuantityOnhand": 1000, "CostMethod": "Perpetual average", ... }, { ... }, { ... } ], ... }
Example 2 cURL Command
Use the following cURL command to submit a request on the REST resource:
curl -u username:password "https://servername/fscmRestApi/resources/version/itemCosts?q=ItemNumber=AS54888"
Example 2 Response Body
The following shows an example of the response body in JSON format.
{ "items": [ { "CostOrganizationId": 100000014977020, "CostOrganizationName": "ZCST-Boston", "CostOrganizationCode": "ORG12", "CostBookId": 100000016508005, "CostBook": "zBIA-CB-CM-S1", "CostProfile": "Average-Subinventory-Asset", "CostProfileId": 300100002670548, "ItemCategory": "Notebook Computers", "ItemCategoryId": 1374, "ItemId": 149, "ItemNumber": "AS54888", "ItemDescription": "Standard Desktop", "CostMethodCode": "PERPETUAL_AVERAGE", "ValuationStructureId": 300100002670542, "ValuationStructureCode": "Inv-Sub-Asset", "ValuationUnitId": 300100007498396, "ValuationUnit": "ORG12-M2-FGI", "ReceiptNumber": null, "TransactionId": 338158, "CurrencyCode": "USD", "UOMName": "Each", "UOMCode": "Ea", "TotalUnitCost": 40, "CostChange": 0, "CostAsOfDate": "2012-04-23T09:52:05+00:00", "EffectiveStartDate": null, "EffectiveEndDate": null, "QuantityOnhand": 10000, "CostMethod": "Perpetual average", ... }, { ... }, { ... } ], ... }
Example 3 cURL Command
Use the following cURL command to submit a request on the REST resource:
curl -u username:password "https://servername/fscmRestApi/resources/version/itemCosts?finder=findItemCostAdjustmentDetails;bindCostOrg=ZCST-Seattle,bindCostBook=ZCST-Seattle,bindItem=AS54888"
Example 3 Response Body
The following shows an example of the response body in JSON format.
{ "items": [ { "CostOrganizationId": 100000014977014, "CostOrganizationName": "ZCST-Seattle", "CostOrganizationCode": "ORG11", "CostBookId": 100000014978010, "CostBook": "ZCST-Seattle", "CostProfile": "ZCST-InvOrg-Asset", "CostProfileId": 100000011883009, "ItemCategory": "Notebook Computers", "ItemCategoryId": 1374, "ItemId": 149, "ItemNumber": "AS54888", "ItemDescription": "Standard Desktop", "CostMethodCode": "PERPETUAL_AVERAGE", "ValuationStructureId": 100000011846089, "ValuationStructureCode": "ZCST-Inv-Org-Asset", "ValuationUnitId": 300100002799598, "ValuationUnit": "ORG11-M1", "ReceiptNumber": null, "TransactionId": 2315466, "CurrencyCode": "USD", "UOMName": "Each", "UOMCode": "Ea", "TotalUnitCost": 114.39904, "CostChange": 0, "CostAsOfDate": "2018-06-04T04:40:17+00:00", "EffectiveStartDate": null, "EffectiveEndDate": null, "QuantityOnhand": 1001989250, "CostMethod": "Perpetual average", ... }, { ... }, { ... } ], ... }
Example 4 cURL Command
Use the following cURL command to submit a request on the REST resource:
curl -u username:password "https://servername/fscmRestApi/resources/version/itemCosts?finder=findItemCosts;bindCostOrg=ZCST-Seattle,bindCostBook=Actual,bindItem=ZCST-Plain-Asset1"
Example 4 Response Body
The following shows an example of the response body in JSON format.
{ "items": [ { "CostOrganizationId": 100000014977014, "CostOrganizationName": "ZCST-Seattle", "CostOrganizationCode": "ORG11", "CostBookId": 100000014978010, "CostBook": "ZCST-Seattle", "CostProfile": "ZCST-InvOrg-Asset", "CostProfileId": 100000011883009, "ItemCategory": "Notebook Computers", "ItemCategoryId": 1374, "ItemId": 149, "ItemNumber": "AS54888", "ItemDescription": "Standard Desktop", "CostMethodCode": "PERPETUAL_AVERAGE", "ValuationStructureId": 100000011846089, "ValuationStructureCode": "ZCST-Inv-Org-Asset", "ValuationUnitId": 300100002799598, "ValuationUnit": "ORG11-M1", "ReceiptNumber": null, "TransactionId": 2315466, "CurrencyCode": "USD", "UOMName": "Each", "UOMCode": "Ea", "TotalUnitCost": 114.39904, "CostChange": 0, "CostAsOfDate": "2018-06-04T04:40:17+00:00", "EffectiveStartDate": null, "EffectiveEndDate": null, "QuantityOnhand": 1001989250, "CostMethod": "Perpetual average", ... }, { ... }, { ... } ], ... }