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.
Permissions
To update the shipment the request must have IoTFleetMonitoringDriversGroup role credentials.
Request
Supported Media Types
- application/json
Header Parameters
-
X-ORACLE-IOT-ORG(optional): string
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
Response
Supported Media Types
- application/json
200 Response
Successfully processed.
Root Schema : BulkOperationResponse_receive
Type:
Show Source
object
-
createdEntries:
array createdEntries
Property description was not set
-
errorEntries:
array errorEntries
Property description was not set
-
failedEntries:
array failedEntries
Property description was not set
-
totalEntries:
integer
Property description was not set
-
updatedEntries:
array updatedEntries
Property description was not set
Nested Schema : CreatedOrUpdatedEntry_receive
Type:
Show Source
object
-
externalId:
string
Property description was not set
-
id:
string
Property description was not set
-
index:
integer
Property description was not set
-
links:
array links
Property description was not set
-
name:
string
Property description was not set
Nested Schema : ErrorOrFailedEntry_receive
Type:
Show Source
object
-
detail:
string
Property description was not set
-
errorCode:
string
Property description was not set
-
externalId:
string
Property description was not set
-
id:
string
Property description was not set
-
index:
integer
Property description was not set
-
name:
string
Property description was not set
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.
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.