To retrieve a sales order collection, amend the following HTTP sample request and send:
Sample request
1
GET https://localhost:50000/b1s/v2/Orders
Check the response:
Check the response code - it should be 200 OK if the HTTP request is successful.
Check the response content - it should contain the list of sales orders with all the properties starting from the first 20 documents. (20 documents are retrieved based on the Pagesize set in the Service Layer Configuration).
At the end of the response content is the property, odata.nextLink, which provides the link for the next collection chunk.
To retrieve specific sales order with all property, amend the following HTTP sample request and send:
Sample request
1
GET https://localhost:50000/b1s/v2/Orders(10)
Check the response:
Check the response code - it should be 200 OK if the HTTP request is successful.
Check the response content - it should contain all the properties for the sales order docentry mentioned in the request.
To retrieve individual property for a sales order, amend the following HTTP sample request and send:
Sample request
1
GET https://localhost:50000/b1s/v2/Orders(10)/DocNum
Check the response:
Check the response code - it should be 200 OK if the HTTP request is successful.
Check the response content - it should contain only the DocNum property along with the @odata.context and @odata.etag.
To retrieve individual property value for a sales order, amend the following HTTP sample request and send:
Sample request
1
GET https://localhost:50000/b1s/v2/Orders(10)/DocNum/$value
Check the response:
Check the response code - it should be 200 OK if the HTTP request is successful.
Check the response content - it should contain only the value of DocNum.
To retrieve the list of the delivery note associated with the Business Partner for a particular sales order, amend the following HTTP sample request and send:
Sample request
1
GET https://localhost:50000/b1s/v2/Orders(10)/BusinessPartner/DeliveryNotes
Check the response:
Check the response code - it should be 200 OK if the HTTP request is successful.
Check the response content - it should contain the first 20 delivery notes associated with the Business Partner used in the sales order. (20 documents are retrieved based on the Pagesize set in the Service Layer Configuration).
At the end of the response content, there is the property odata.nextLink, which provides the link for the next collection chunk.
To retrieve the sales order collection only with three properties DocNum,DocDueDate,DocTotal using query options, amend the following HTTP sample request and send:
Sample request
1
GET https://localhost:50000/b1s/v2/Orders/?$select=DocNum,DocDate,DocTotal
Check the response:
Check the response code - it should be 200 OK if the HTTP request is successful.
Check the response content - it should contain the first 20 sales orders with properties: DocNum,DocDate,DocTotal. (20 documents are retrieved based on the Pagesize set in the Service Layer Configuration).
At the end of the response content is the property, odata.nextLink, which provides the link for the next collection chunk.
To retrieve the sales order collection only with three properties (DocNum,DocDate,Doctotal), and filter the document based on DocDate using query options, amend the following HTTP sample request and send:
Sample request
1
GET https://localhost:50000/b1s/v2/Orders$filter=DocDate ge '2020-03-23'& $select=DocNum,DocDueDate,DocTotal
Check the response:
Check the response code - it should be 200 OK if the HTTP request is successful.
Check the response content - it should contain the first 20 sales orders with properties: DocNum,DocDate,DocTotal. (20 documents are retrieved based on the Pagesize set in the Service Layer Configuration).
At the end of the response content is the property, odata.nextLink, which provides the link for the next collection chunk.
To retrieve the count of sales order in the database using query options, amend the following HTTP sample request and send:
Sample request
1
GET https://localhost:50000/b1s/v2/Orders?$apply=aggregate($count as OrdersCount)
Check the response:
Check the response code - it should be 200 OK if the HTTP request is successful.
Check the response content - it should contain the count value under the property name OrdersCount.
To retrieve the list of sales orders grouped by CardCode and DocTotal using query options, amend the following HTTP sample request and send:
Sample request
1
GET https://localhost:50000/b1s/v2/Orders?$apply=groupby((CardCode), aggregate(DocTotal with sum as Total))
Check the response:
Check the response code - it should be 200 OK if the HTTP request is successful.
Check the response content - it should contain the list of CardCode with sum of the DocTotal value..
To retrieve the associated business partner information from the sales order in the same payload, amend the following HTTP sample request and send:
Sample request
1
GET https://localhost:50000/b1s/v2/Orders(10)?$select=*,BusinessPartner&$expand=BusinessPartner
Check the response:
Check the response code - it should be 200 OK if the HTTP request is successful.
Check the response content - After the "@odata.etag" property the BusinessPartner entity information is displayed followed by the sales order properties.