Complete a shipment

post

/fleetMonitoring/clientapi/v2/shipments/completed

This operation changes the status of the given shipments to completed.

Permissions
To update the shipment the request must have IoTFleetMonitoringDriversGroup role credentials.

Request

Supported Media Types
Header Parameters
  • To allow targeting requests to different organizations. The header value should contain the organization identifier(orgId). This header is optional, if not provided orgId will be ORA_DEFAULT_ORG
Body ()
Root Schema : IDRefs_receive
Type: object
Show Source
Nested Schema : ids
Type: array
Shipment IDs
Show Source
Back to Top

Response

Supported Media Types

200 Response

Successfully processed.
Body ()
Root Schema : BulkOperationResponse_receive
Type: object
Show Source
Nested Schema : createdEntries
Type: array
Property description was not set
Show Source
Nested Schema : errorEntries
Type: array
Property description was not set
Show Source
Nested Schema : failedEntries
Type: array
Property description was not set
Show Source
Nested Schema : updatedEntries
Type: array
Property description was not set
Show Source
Nested Schema : CreatedOrUpdatedEntry_receive
Type: object
Show Source
Nested Schema : ErrorOrFailedEntry_receive
Type: object
Show Source

401 Response

Unauthorized. The request requires user authentication.

404 Response

Not Found. The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.

406 Response

Request Not Acceptable. The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request.
Back to Top

Examples

curl -X POST 
   -u <username>:<password>
   -H 'Accept: application/json'
   -H 'Content-Type: application/json'
   https://iotserver/fleetMonitoring/clientapi/v2/shipments/completed

Example of Request Body

The following example shows the content of the request body in JSON format:

{
"ids" : ["shipment_ID"]
}

Example of Response Body

The following example shows the content of the response body in JSON format:

{
"totalEntries": 1,
"updatedEntries": [
{
"index": 0,
"id": "FB7FD9B7-11C5-49E9-B02B-E0D8547FD22C",
"externalId": "Planned-Shipment-2",
"name": "Planned_Shipment-2",
"links": [
{
"href": "https://iotserver:443/fleetMonitoring/clientapi/v2/shipments/start/FB7FD9B7-11C5-49E9-B02B-E0D8547FD22C",
"rel": "self"
}
]
}
],
"links": [
{
"href": "https://iotserver:443/fleetMonitoring/clientapi/v2/shipments/completed",
"rel": "self"
},
{
"href": "https://iotserver:443/fleetMonitoring/clientapi/v2/shipments/completed",
"rel": "canonical"
}
]
}



Complete cURL Example

The following example shows a complete cURL command that you can use to perform the described operation:

curl -X POST 
   -u <username>:<password>
   -H 'Accept: application/json'
   -H 'Content-Type: application/json'
   -d '{"ids":["ids_1","ids_2","ids_3"]}'
   https://iotserver/fleetMonitoring/clientapi/v2/shipments/completed



Note that in the request, https://iotserver will be replaced by the name and port of your assigned IoT Cloud Service instance. The format of the Cloud Service instance is https://myinstance-myidentitydomain.iot.us.oraclecloud.com and the default port is 443.
Back to Top