You are on page 1of 11

1º Identificar a Transação informando o ItemNumber

https://emao-dev1.fa.la1.oraclecloud.com/fscmRestApi/resources/latest/itemCosts?
q=ItemNumber=LBAINTROB8061

Capturar o valor do campo > "TransactionId": 709521 (TRANSACTION ID X ITEM NUMBER)

RESPONSE BODY:

"items": [ {

"CostOrganizationId": 300000003998049,

"CostOrganizationName": "AMMO",

"CostOrganizationCode": "AMMO_CO",

"CostBookId": 300000004203561,

"CostBook": "Primary",

"CostProfile": "Perpetual Average - Asset",

"CostProfileId": 300000004203692,

"ItemCategory": "Custos_01",
"ItemCategoryId": 300000005175449,

"ItemId": 300000004507564,

"ItemNumber": "LBAINTROB8061",

"ItemDescription": "TOALHA TINGIDA ROSTO LE BAIN FITNESS 100%",

"CostMethodCode": "PERPETUAL_AVERAGE",

"ValuationStructureId": 300000004203688,

"ValuationStructureCode": "Asset Default",

"ValuationUnitId": 300000004192936,

"ValuationUnit": "AMMO_CO-AMMO_CD",

"ReceiptNumber": null,

"TransactionId": 709521,

"CurrencyCode": "BRL",

"UOMName": "UN",

"UOMCode": "UN",

"TotalUnitCost": 22,

"CostChange": 10,

"CostAsOfDate": "2021-04-12T21:59:00+00:00",

"EffectiveStartDate": null,

"EffectiveEndDate": null,

"QuantityOnhand": 872,

"CostMethod": "Perpetual average",

"links": [

"rel": "self",

"href": "https://emao-
dev1.fa.la1.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/itemCosts/00070000000EACE
D00057708000110D931ABC1610000000EACED00057708000110D931AEE4290000000EACED000577
08000110D931B387AC0000000EACED00057708000110D931AEBAA80000000EACED0005770800000
000000AD3910000005BACED0005737200126A6176612E73716C2E54696D657374616D702618D5C8
0153BF650200014900056E616E6F737872000E6A6176612E7574696C2E44617465686A81014B5974
190300007870770800000178C81850A078000003E80000001150657270657475616C206176657261
6765",

"name": "itemCosts",
"kind": "item"

},

"rel": "canonical",

"href": "https://emao-
dev1.fa.la1.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/itemCosts/00070000000EACE
D00057708000110D931ABC1610000000EACED00057708000110D931AEE4290000000EACED000577
08000110D931B387AC0000000EACED00057708000110D931AEBAA80000000EACED0005770800000
000000AD3910000005BACED0005737200126A6176612E73716C2E54696D657374616D702618D5C8
0153BF650200014900056E616E6F737872000E6A6176612E7574696C2E44617465686A81014B5974
190300007870770800000178C81850A078000003E80000001150657270657475616C206176657261
6765",

"name": "itemCosts",

"kind": "item"

},

"rel": "child",

"href": "https://emao-
dev1.fa.la1.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/itemCosts/00070000000EACE
D00057708000110D931ABC1610000000EACED00057708000110D931AEE4290000000EACED000577
08000110D931B387AC0000000EACED00057708000110D931AEBAA80000000EACED0005770800000
000000AD3910000005BACED0005737200126A6176612E73716C2E54696D657374616D702618D5C8
0153BF650200014900056E616E6F737872000E6A6176612E7574696C2E44617465686A81014B5974
190300007870770800000178C81850A078000003E80000001150657270657475616C206176657261
6765/child/costDetails",

"name": "costDetails",

"kind": "collection"

}],

"count": 1,

"hasMore": false,

"limit": 25,

"offset": 0,

"links": [ {

"rel": "self",
"href": "https://emao-
dev1.fa.la1.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/itemCosts",

"name": "itemCosts",

"kind": "collection"

}]

--------------------------------------------------------------------------------------------------------------------------------------

2º Realizar o Ajuste conforme o TransactionId dos Itens com a API abaixo:

https://emao-dev1.fa.la1.oraclecloud.com/fscmRestApi/resources/latest/costAdjustments
BODY:

"TransactionId" : 709521, ---> TRANSACTION CAPTURADO NO PASSO ANTERIOR (BODY X ITEM)

"AdjustmentType" : "Perpetual",

"ReasonCode" : "Saldo Inicial",

"AdjustmentStatus": "Submitted",

"AdjustmentDate": "2020-12-12T11:53:07+00:00", --->> DEFINIR A DATA QUE A ALTERAÇÃO SERÁ


APLICADA

"AdjustmentDetail" : [

"CostElement" : "Direct Material",

"NewCost" : 22 ---> NOVO VALOR

RESPONSE BODY:

"AdjustmentHeaderId": 32033,

"AdjustmentNumber": "47039",

"AdjustmentTypeCode": "P",

"AdjustmentDate": "2020-12-12T11:53:07+00:00",

"AdjustmentStatusCode": "S",

"ReasonCode": "Saldo Inicial",

"TransactionId": 708723,

"CostOrganizationId": 300000003998049,

"CostBookId": 300000004203561,

"ItemId": 300000004507564,

"InventoryOrganizationId": 300000003745486,
"ReceiptQuantity": null,

"QuantityOnhand": 872,

"TotalUnitCost": 20,

"TotalNewCost": 22,

"ValuationUnitId": 300000004192936,

"CostDate": "2021-04-12T21:59:00+00:00",

"ReceiptNumber": null,

"CurrencyCode": "BRL",

"CostOrganizationName": "AMMO",

"CostBook": "Primary",

"InventoryOrganizationName": "AMMO_CD",

"Item": "LBAINTROB8061",

"ValuationUnit": "AMMO_CO-AMMO_CD",

"AdjustmentType": "Perpetual",

"AdjustmentStatus": "Submitted",

"Reason": "Saldo Inicial",

"UOMCode": "UN",

"UOMName": "UN",

"AdjustmentDetail": [ {

"AdjustmentHeaderId": 32033,

"CostElementId": 300000004203632,

"ExpensePoolId": 0,

"NewCost": 22,

"SourceTransactionCostId": 0,

"SourceTransactionId": 708723,

"UnitCost": 20,

"UserAdjustmentId": 33032,

"UserComment": null,

"CostElement": "Direct Material",

"ExpensePool": null,

"UserDefinedFlag": false,
"links": [

"rel": "self",

"href": "https://emao-
dev1.fa.la1.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/costAdjustments/32033/child
/AdjustmentDetail/33032",

"name": "AdjustmentDetail",

"kind": "item",

"properties": {"changeIndicator":
"ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149
000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212
E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC
951D0B94E08B02000078700000000178"}

},

"rel": "canonical",

"href": "https://emao-
dev1.fa.la1.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/costAdjustments/32033/child
/AdjustmentDetail/33032",

"name": "AdjustmentDetail",

"kind": "item"

},

"rel": "parent",

"href": "https://emao-
dev1.fa.la1.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/costAdjustments/32033",

"name": "costAdjustments",

"kind": "item"

},

"rel": "lov",

"href": "https://emao-
dev1.fa.la1.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/costAdjustments/32033/child
/AdjustmentDetail/33032/lov/CostElementLOV",

"name": "CostElementLOV",
"kind": "collection"

}],

"links": [

"rel": "self",

"href": "https://emao-
dev1.fa.la1.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/costAdjustments/32033",

"name": "costAdjustments",

"kind": "item"

},

"rel": "canonical",

"href": "https://emao-
dev1.fa.la1.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/costAdjustments/32033",

"name": "costAdjustments",

"kind": "item"

},

"rel": "lov",

"href": "https://emao-
dev1.fa.la1.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/costAdjustments/32033/lov/V
aluationUnitLOV",

"name": "ValuationUnitLOV",

"kind": "collection"

},

"rel": "lov",

"href": "https://emao-
dev1.fa.la1.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/costAdjustments/32033/lov/C
ostBookLOV",

"name": "CostBookLOV",
"kind": "collection"

},

"rel": "lov",

"href": "https://emao-
dev1.fa.la1.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/costAdjustments/32033/lov/It
emLOV",

"name": "ItemLOV",

"kind": "collection"

},

"rel": "lov",

"href": "https://emao-
dev1.fa.la1.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/costAdjustments/32033/lov/R
easonLOV",

"name": "ReasonLOV",

"kind": "collection"

},

"rel": "lov",

"href": "https://emao-
dev1.fa.la1.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/costAdjustments/32033/lov/C
ostOrganizationLOV",

"name": "CostOrganizationLOV",

"kind": "collection"

},

"rel": "lov",

"href": "https://emao-
dev1.fa.la1.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/costAdjustments/32033/lov/A
djustmentTypeLOV",

"name": "AdjustmentTypeLOV",

"kind": "collection"

},
{

"rel": "lov",

"href": "https://emao-
dev1.fa.la1.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/costAdjustments/32033/lov/A
djustmentStatusLOV",

"name": "AdjustmentStatusLOV",

"kind": "collection"

},

"rel": "lov",

"href": "https://emao-
dev1.fa.la1.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/costAdjustments/32033/lov/I
nventoryOrganizationLOV",

"name": "InventoryOrganizationLOV",

"kind": "collection"

},

"rel": "lov",

"href": "https://emao-
dev1.fa.la1.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/costAdjustments/32033/lov/A
djustmentNumberLOV",

"name": "AdjustmentNumberLOV",

"kind": "collection"

},

"rel": "lov",

"href": "https://emao-
dev1.fa.la1.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/costAdjustments/32033/lov/U
nitOfMeasureLOV",

"name": "UnitOfMeasureLOV",

"kind": "collection"

},

"rel": "child",
"href": "https://emao-
dev1.fa.la1.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/costAdjustments/32033/child
/AdjustmentDetail",

"name": "AdjustmentDetail",

"kind": "collection"

You might also like