Skip to Main Content

ORDS, SODA & JSON in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

how to process body content in received REST POST call

cacodriOct 22 2021

Hi everyone,
I need to process a received POST call that contains a json of the type:
{
"partnerID": "DEM79000500",
"partnerName": "Empresa Demostracion ",
"transactionID": "",
"Version": "1.0",
"QuantityTotal": 1,
"Quantity": 1,
"Page": 1,
"PageSize": 50,
"PagesTotal": 1,
"customer": [
{
"RecNumber": 1,
"ID": "GEN77965450",
"Nationality": {
"CT_Code": "GEN",
"ISO_3166-2": "G1",
"ISO_3166-3": "GEN",
"ISO_3166-Num": "000"
},
"NationalID": "77960000",
"CheckDigit": "K",
"Name": "Transporte Siglo XX",
"LastName": null,
"CommBusiness": "Transportes",
"CustomerSegment": {
"ID": 7,
"Description": "grandes"
},
"SalesMan": {
"ID": "CHL6898000",
"Name": "Diego",
"lastName": "Santos"
},
"CollectExe": {
"ID": "CHL24000000",
"Name": "Manuel",
"lastName": "Diaz"
},
"address": {
"Quantity": 1,
"List": [
{
"Number": 1,
"customerID": "GEN77965450",
"ID": 345,
"Type": {
"partnerCode": null,
"CT_Code": "COB",
"CT_Name": "Cobranza"
},
"Status": {
"partnerCode": null,
"CT_Code": "ACT",
"CT_Name": "Activo"
},
"Region": {
"partnerCode": null,
"CT_Code": "013",
"CT_Name": "XIII Metropolitana de Santiago"
},
"City": {
"partnerCode": null,
"CT_Code": "131",
"CT_Name": "Santiago"
},
"Commune": {
"partnerCode": "STG1",
"CT_Code": "13101",
"CT_Name": "Santiago"
},
"Address": "Ingresar Dirección",
"Phone_1": "Ingresar Teléfono",
"Phone_2": null,
"Mobile_1": "Ingresar Movil",
"Mobile_2": null,
"e-mail": "demo.cobrotech@gmail.com",
"Comment": null
}
]
}
}
]
}

to do this I need to pass the body to a function of its own.
your help is greatly appreciated
Thank you so much

Carlos

This post has been answered by cacodri on Oct 27 2021
Jump to Answer

Comments

Post Details

Added on Oct 22 2021
3 comments
2,901 views