Supplier Management

Get Involved. Join the Conversation.

Topic

    David Wright
    Child fields in request parameter for Get All Suppliers REST...Answered
    Topic posted November 8, 2019 by David Wright, tagged Business Intelligence, Fusion, How-To 
    22 Views, 3 Comments
    Title:
    Child fields in request parameter for Get All Suppliers REST API
    Summary:
    What's the notation for child fields for expanded items in this API
    Content:

    The documentation says "If an indirect child resource is provided (Example: Employees.Managers), the missing children will be processed implicitly. "

    So, if my parameters say 'fields' : 'Alias,AlternateName,Supplier,SupplierId,SupplierNumber,sites.PaymentTerms' then shouldn't sites.PaymentTerms be valid for Suppliers?  However, when I try to use any variation of this (with . or ; or :) it fails with 'URL request parameter fields with value Alias,AlternateName,Supplier,SupplierId,SupplierNumber,sites.PaymentTerms is not valid.'

    Is my notation incorrect, or can I not access child items in such a manner for Supplier?

    Best Comment

    Piyush Singh

    Hi David,

    Please try this and let us know it works or not:

    'fields' :  Alias,AlternateName,Supplier,SupplierId,SupplierNumber;sites:PaymentTerms

    Thanks,

    Piyush

    Comment

     

    • Piyush Singh

      Hi David,

      Can you share the exact URL that you are using?

      Thanks,

      Piyush

      • David Wright

        I'm using the here's the data:

               headers = {'Content-Type' : 'application/vnd.oracle.adf.resourcecollection+json',}
                parameters = {'expand' : 'sites', 'onlyData' : True, 'orderBy' : 'SupplierId:asc', 'fields' : 'Alias,AlternateName,Supplier,SupplierId,SupplierNumber,sites.PaymentTerms', 'limit': 500, 'offset' : limits}

                response = requests.get('https://<company>.oraclecloud.com/fscmRestApi/resources/11.13.18.05/suppliers', headers=headers, auth=('<username>', '<password>'), params=parameters)

        I changed the domain and the auth stuff to be generic to protect sensitive information.

    • Piyush Singh

      Hi David,

      Please try this and let us know it works or not:

      'fields' :  Alias,AlternateName,Supplier,SupplierId,SupplierNumber;sites:PaymentTerms

      Thanks,

      Piyush